public function round($subject, $precision = 0)
    {
        if (!is_numeric($subject)) {
            return NAN;
        }
        $subject = floatval($subject);
        if ($precision != null && !is_int($precision)) {
            return NAN;
        }
        return round($subject, $precision);
    }
public function round($subject, $precision = 0)
    {
        if (!is_numeric($subject)) {
            return NAN;
        }
        $subject = floatval($subject);
        if ($precision != null && !is_int($precision)) {
            return NAN;
        }
        return round($subject, $precision);
    }
public function round ( $ subject , $ precision = 0 ) { if ( ! is_numeric ( $ subject ) ) { return NAN ; } $ subject = floatval ( $ subject ) ; if ( $ precision != null && ! is_int ( $ precision ) ) { return NAN ; } return round ( $ subject , $ precision ) ; }
Rounds the subject to the given precision

The precision defines the number of digits after the decimal point.
Negative values are also supported (-1 rounds to full 10ths).

@param float $subject The value to round
@param integer $precision The precision (digits after decimal point) to use, defaults to 0
@return float The rounded value
Rounds the subject to the given precision