operator - method

Decimal operator -(
  1. Decimal other
)

Subtraction

Implementation

Decimal operator -(Decimal other) {
  final maxScale = math.max(_scale, other._scale);
  final thisValue = _value * pow10(maxScale - _scale);
  final otherValue = other._value * pow10(maxScale - other._scale);
  return Decimal(thisValue - otherValue, maxScale);
}