【Dart/Flutter】中对于BigInt的一些操作

2022-01-07  本文已影响0人  坐了整个春夏秋冬

Dart中BigInt的基本计算函数

  /// Addition operator.
  BigInt operator +(BigInt other);

  /// Subtraction operator.
  BigInt operator -(BigInt other);

  /// Multiplication operator.
  BigInt operator *(BigInt other);

  /// Division operator.
  double operator /(BigInt other);
  double d = 1.5;
  BigInt bigNum = BigInt.from(99);
  bigNum = bigNum * BigInt.from(d * 10);
  bigNum = bigNum ~/ BigInt.from(10);
上一篇 下一篇

猜你喜欢

热点阅读