mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 10:32:29 +00:00
feat(big): add SBigIsOdd
This commit is contained in:
parent
6759cb4d7c
commit
9074869097
5 changed files with 35 additions and 0 deletions
|
|
@ -215,6 +215,11 @@ int32_t IsEven(const BigBuffer &num) {
|
|||
return num.Count() == 0 || (num[0] & 1) == 0;
|
||||
}
|
||||
|
||||
int32_t IsOdd(const BigBuffer &num) {
|
||||
num.Trim();
|
||||
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