satAdd (Function)

Signature: satAdd(a: int, b: int) -> int

Description: Total saturating addition: overflow clamps to the int range and performs no Arith operation.

Parameters

  • a (int): The first addend
  • b (int): The second addend

Returns: int

Example

let s = satAdd(9223372036854775807, 1)  // 9223372036854775807
s = satAdd (9223372036854775807, 1)  // 9223372036854775807