API Reference › BigInt › BigInt.cmp
method

BigInt.cmp

BigInt.cmp(a, b) -> int

Compares two big integers, returning -1, 0, or 1 as a is less than, equal to, or greater than b.

Example

program Demo {
  handler Step phase Update {
    if BigInt.cmp(score, best) > 0 { best = score }
  }
}
← All symbols