constrain method

double constrain(
  1. num number
)

Apply the constraints used in the current formatter to the given number. Applies maxFractionDigits, significantDigits, and the rounding mode, and returns the constrained number.

Implementation

double constrain(num number) {
  return _constrain(number.toDouble());
}