round

Syntax

double round(double number)

Arguments

number
Any double or float number.

Return

The rounded value.

Description

Returns the value of number rounded to the nearest or even integral value.

Example

%ffp

OnFilterStart:
{
    Info("Rounding 2.543 gives %f", round(2.543));
    Info("Rounding -2.500 gives %f", round(-2.500));
}

See Also

ceil, chop, floor, iround, C Runtime Functions