roundInc()

Synopsis

Round a number n to the nearest increment of i. Always rounds up for values equidistant between increments, whether even or odd.

Syntax

roundInc ( n As Number, _
           i As Number ) As Number 
Argument Type Description
n Number The input number .
i Number The increment to round to.

Example 1

Intent >roundInc(5.73, 0.25) 
--> 5.75 

Example 2

Intent >roundInc(-0.37, 0.1) 
--> -0.4 

Example 3

Intent >roundInc(376.9, 10) 
--> 380.0 

Example 4

Intent >roundInc(385, 10) 
--> 390.0 
Compare this with roundToNearest(385, 10) which returns 380.0