ofFixedPointValue method

FpvType ofFixedPointValue(
  1. FixedPointValue fxv, {
  2. FloatingPointRoundingMode roundingMode = FloatingPointRoundingMode.roundNearestEven,
})

Converts fxv directly into this floating-point format.

The exact fixed-point value is rounded once according to roundingMode.

Implementation

FpvType ofFixedPointValue(FixedPointValue fxv,
    {FloatingPointRoundingMode roundingMode =
        FloatingPointRoundingMode.roundNearestEven}) {
  final exact = fxv.toScaledBigInt();
  return ofScaledBigInt(exact.significand, exact.exponent,
      roundingMode: roundingMode);
}