iround

Syntax

int round(double number)

Arguments

number
Any double or float number.

Return

The rounded value as an integer.

Description

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

Example

%ffp

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

See Also

iceil, ichop, ifloor, round, C Runtime Functions