API Reference / roundHalfUp · function
Function: roundHalfUp()
function roundHalfUp(x): number;
Round half toward +infinity, guarded against the IEEE edge where
x + 0.5 itself rounds across the half (mirrors Python _js_round).
Parameters
| Parameter | Type |
|---|---|
x | number |
Returns
number