API Reference › Decimal › Decimal.sub
method

Decimal.sub

Decimal.sub(a, b) -> Decimal

Returns the exact difference a - b, aligning scales so balances stay penny-accurate.

Example

program Demo {
  handler Step phase Update {
    let change = Decimal.sub(paid, price)
  }
}
← All symbols