public function getIsCloserToNext( $precision = false, $mode = PHP_ROUND_HALF_UP )
	{
		if ( ! $this->getIsDecimal() ) {
			return false;
		}

		if ( $precision === false ) $precision = $this->scale( $this->_value );
		if ( $precision < 0 ) $precision = $precision = 0;

		$decimalPart = $this->getDecimalPart();
		if ( $precision >= strlen( $decimalPart ) ) return false;

		// Get the portion of the decimal part affected by the scale value
		$decimalPart = substr( $decimalPart, $precision );
		$result = bccomp( "0." . $decimalPart, "0.5", max( $this->scale( $decimalPart ), 1 ) );
		return $mode == PHP_ROUND_HALF_DOWN ? $result == 1 : $result >= 0;
	}
public function getIsCloserToNext( $precision = false, $mode = PHP_ROUND_HALF_UP )
	{
		if ( ! $this->getIsDecimal() ) {
			return false;
		}

		if ( $precision === false ) $precision = $this->scale( $this->_value );
		if ( $precision < 0 ) $precision = $precision = 0;

		$decimalPart = $this->getDecimalPart();
		if ( $precision >= strlen( $decimalPart ) ) return false;

		// Get the portion of the decimal part affected by the scale value
		$decimalPart = substr( $decimalPart, $precision );
		$result = bccomp( "0." . $decimalPart, "0.5", max( $this->scale( $decimalPart ), 1 ) );
		return $mode == PHP_ROUND_HALF_DOWN ? $result == 1 : $result >= 0;
	}
public function getIsCloserToNext ( $ precision = false , $ mode = PHP_ROUND_HALF_UP ) { if ( ! $ this -> getIsDecimal ( ) ) { return false ; } if ( $ precision === false ) $ precision = $ this -> scale ( $ this -> _value ) ; if ( $ precision < 0 ) $ precision = $ precision = 0 ; $ decimalPart = $ this -> getDecimalPart ( ) ; if ( $ precision >= strlen ( $ decimalPart ) ) return false ; // Get the portion of the decimal part affected by the scale value
 $ decimalPart = substr ( $ decimalPart , $ precision ) ; $ result = bccomp ( "0." . $ decimalPart , "0.5" , max ( $ this -> scale ( $ decimalPart ) , 1 ) ) ; return $ mode == PHP_ROUND_HALF_DOWN ? $ result == 1 : $ result >= 0 ; }
Returns true if the number at the scale position in the decimal part of the number is closer to the next power.
@param int $precision
@param int $mode PHP_ROUND_HALF_UP (default), PHP_ROUND_HALF_DOWN, PHP_ROUND_HALF_EVEN, PHP_ROUND_HALF_ODD
@return bool
Returns true if the number at the scale position in the decimal part of the number is closer to the next power .