Returns the integer nearest to the given number, n. If the given number is equidistant between two integers (ends in ".5") the function always rounds up, whether even or odd.
roundPlus ( n As Number ) As Integer
Argument | Type | Description |
---|---|---|
n | number | The input number . |
Intent >roundPlus(0.7) --> 1
Intent >roundPlus(-1.5) --> -1Because -1.5 was exactly between -1 and -2, the function rounded up to the nearest integer , -1. See also round().