remainder method

  1. @override
Number remainder(
  1. Number other
)
override

Returns the remainder of the truncating division of this by other.

The result r of this operation satisfies: this == (this ~/ other) * other + r. As a consequence the remainder r has the same sign as the divider this.

Implementation

@override
Number remainder(Number other) => (other is Decimal)
    ? Decimal.fromInt(value).remainder(other)
    : Integer(value.remainder((other as Integer).value));