mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
feat(big) add SBigIsEven
This commit is contained in:
parent
328bbf61d8
commit
6759cb4d7c
5 changed files with 34 additions and 0 deletions
|
|
@ -211,6 +211,10 @@ void InsertLowPart(uint64_t& value, uint32_t low) {
|
|||
value = (value << 32) | low;
|
||||
}
|
||||
|
||||
int32_t IsEven(const BigBuffer &num) {
|
||||
return num.Count() == 0 || (num[0] & 1) == 0;
|
||||
}
|
||||
|
||||
uint64_t MakeLarge(uint32_t low, uint32_t high) {
|
||||
return low + (static_cast<uint64_t>(high) << 32);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue