withPrecision method

T withPrecision([
  1. Precision precision = Precision.two
])

Get the exact precision on value calculation

Implementation

T withPrecision([Precision precision = Precision.two]) => withValue(
      value == 0 ? 0 : value.toDouble().toPrecision(precision.value),
    );