roundNext

roundNext, function

def pure const roundNext(quantity: number): number

Returns the entered quantity rounded following the ‘away from zero’ rounding convention (see wikipedia).

Example

show table "" with
  roundNext(-1.5) 
  roundNext(-0.5) 
  roundNext(0.5)  
  roundNext(1.5)  

This outputs the following table:

roundNext(-1.5) roundNext(-0.5) roundNext(0.5) roundNext(1.5)
-2 -1 1 2

See also

User Contributed Notes
0 notes + add a note