/** * Round. * <P> * Round mode is one of { * <CODE>ROUND_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR, * ROUND_HALF_UP, ROUND_HALF_DOWN, ROUND_HALF_EVEN, * ROUND_HALF_CEILING, ROUND_HALF_FLOOR, ROUND_HALF_ODD, * ROUND_UNNECESSARY, DEFAULT_ROUND_MODE (==ROUND_HALF_UP)</CODE> . * <P> * If rounding isn't necessary, i.e. this BigRational is an integer, [as an * optimization] this BigRational is returned. * <P> * Possible loss of precision. */ // @PrecisionLoss public static BigInteger round(BigFraction f, int roundMode) { // [rounding step, possible loss of precision step] return roundToBigInteger(f, roundMode); }
/** * Round. * <P> * Round mode is one of { * <CODE>ROUND_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR, * ROUND_HALF_UP, ROUND_HALF_DOWN, ROUND_HALF_EVEN, * ROUND_HALF_CEILING, ROUND_HALF_FLOOR, ROUND_HALF_ODD, * ROUND_UNNECESSARY, DEFAULT_ROUND_MODE (==ROUND_HALF_UP)</CODE> . * <P> * If rounding isn't necessary, i.e. this BigRational is an integer, [as an * optimization] this BigRational is returned. * <P> * Possible loss of precision. */ // @PrecisionLoss public static BigInteger round(BigFraction f, int roundMode) { // [rounding step, possible loss of precision step] return roundToBigInteger(f, roundMode); }