mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
feat(big): add SBigIsZero
This commit is contained in:
parent
c9826d2336
commit
1cad63b7f2
5 changed files with 33 additions and 0 deletions
|
|
@ -225,6 +225,11 @@ int32_t IsOne(const BigBuffer &num) {
|
|||
return num.Count() == 1 && num[0] == 1;
|
||||
}
|
||||
|
||||
int32_t IsZero(const BigBuffer &num) {
|
||||
num.Trim();
|
||||
return num.Count() == 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