Package ptolemy.math

Class Rounding.RoundHalfEven

  • All Implemented Interfaces:
    java.lang.Cloneable
    Enclosing class:
    Rounding

    public static class Rounding.RoundHalfEven
    extends Rounding
    Rounding class implementing the round half even strategy.
    • Method Detail

      • round

        public java.math.BigInteger round​(java.math.BigDecimal dec)
        Description copied from class: Rounding
        Round the BigDecimal value using the appropriate rounding strategy. The result is a BigInteger value rounded appropriately. Each class that extends Rounding will provide a mode specific round function.
        Specified by:
        round in class Rounding
        Parameters:
        dec - value to be rounded
        Returns:
        The rounded BigInteger.