operator ~/ method

  1. @override
Integer operator ~/(
  1. Number other
)
override

Truncating division operator.

If either operand is a double then the result of the truncating division a ~/ b is equivalent to (a / b).truncate().toInt().

If both operands are ints then a ~/ b performs the truncating integer division.

Implementation

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