SplitScript reference / Numeric / subtract

Numeric.subtract

Operator

T.subtract(other: T) -> T where T: Numeric

Subtracts another value of the same numeric type.

This method is also the implementation of the - operator. Integer overflow wraps modulo the receiver's declared bit width.

Parameters

  • other: The value to subtract.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Subtract two values

let difference = 50 - 8