API Reference › BigInt › BigInt.is_zero
method

BigInt.is_zero

BigInt.is_zero(a) -> bool

Returns true when the value is exactly zero — cheaper and clearer than comparing against BigInt.from(0).

Example

program Demo {
  handler Step phase Update {
    if BigInt.is_zero(balance) { gameOver() }
  }
}
← All symbols