operator ~/ method

BigInt operator ~/ (
  1. BigInt other
)

Truncating division operator.

Performs a truncating integer division, where the remainder is discarded.

The remainder can be computed using the remainder method.

Examples:

var seven = BigInt.from(7);
var three = BigInt.from(3);
seven ~/ three;    // => 2
(-seven) ~/ three; // => -2
seven ~/ -three;   // => -2
seven.remainder(three);    // => 1
(-seven).remainder(three); // => -1
seven.remainder(-three);   // => 1

Implementation

BigInt operator ~/(BigInt other);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-core/BigInt/operator_truncate_divide.html