W3cubDocs

/Dart 2

operator ~/ method

BigInt operator ~/ (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 = new BigInt.from(7);
var three = new 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.5.0/dart-core/BigInt/operator_truncate_divide.html