scale property

int scale

The scale of this Decimal.

The scale is the number of digits after the decimal point.

Decimal.parse('1.5').scale; // => 1
Decimal.parse('1').scale; // => 0

Implementation

int get scale {
  var i = 0;
  var x = _rational;
  while (!x.isInteger) {
    i++;
    x *= _r10;
  }
  return i;
}