remainder 抽象方法
- BigInt other
返回 this 对 other 进行截断除法后的余数。
此操作的结果 r 满足: this == (this ~/ other) * other + r。 因此,余数 r 的符号与除数 this 相同。
示例
print(BigInt.from(5).remainder(BigInt.from(3))); // 2
print(BigInt.from(-5).remainder(BigInt.from(3))); // -2
print(BigInt.from(5).remainder(BigInt.from(-3))); // 2
print(BigInt.from(-5).remainder(BigInt.from(-3))); // -2
实现
BigInt remainder(BigInt other);