public function toInteger(RoundingMode $rounding_mode = null)
    {
        if (null === $rounding_mode) {
            $rounding_mode = RoundingMode::HALF_UP();
        }

        $value        = $this->toNative();
        $integerValue = \round($value, 0, $rounding_mode->toNative());
        $integer      = new Integer($integerValue);

        return $integer;
    }
public function toInteger(RoundingMode $rounding_mode = null)
    {
        if (null === $rounding_mode) {
            $rounding_mode = RoundingMode::HALF_UP();
        }

        $value        = $this->toNative();
        $integerValue = \round($value, 0, $rounding_mode->toNative());
        $integer      = new Integer($integerValue);

        return $integer;
    }
public function toInteger ( RoundingMode $ rounding_mode = null ) { if ( null === $ rounding_mode ) { $ rounding_mode = RoundingMode :: HALF_UP ( ) ; } $ value = $ this -> toNative ( ) ; $ integerValue = \ round ( $ value , 0 , $ rounding_mode -> toNative ( ) ) ; $ integer = new Integer ( $ integerValue ) ; return $ integer ; }
Returns the integer part of the Real number as a Integer

@param  RoundingMode $rounding_mode Rounding mode of the conversion. Defaults to RoundingMode::HALF_UP.
@return Integer
Returns the integer part of the Real number as a Integer