satAdd (Function)

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

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

Parameters

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

Returns: t0

Example

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