roundPlus()

Synopsis

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.

Syntax

roundPlus ( n As Number ) As Integer 
Argument Type Description
n number The input number .

Example 1

Intent >roundPlus(0.7) 
--> 1 

Example 2

Intent >roundPlus(-1.5) 
--> -1 
Because -1.5 was exactly between -1 and -2, the function rounded up to the nearest integer , -1. See also round().