iround

int iround(fixed x)

Description

Returns x rounded to the nearest integer as an integer.

See the article on Rounding for all rounding modes.

Examples

iround(2.3) -> 2
iround(3.8) -> 4
iround(5.5) -> 6
iround(-2.3) -> -2
iround(-3.8) -> -4
iround(-5.5) -> -5