UI module

round

procedureextensionexperimentalsince 0.31.0Source

value rounded to the nearest whole number (halves go up).

Example↗
assert(round(2.5) == 3);
assert(round(2.4) == 2);
round :: (value: float) -> float

value rounded to the nearest whole number (halves go up).

Parameters

value: float
the number to round.

Returns

float
Example↗
assert(round(2.5) == 3);
assert(round(2.4) == 2);

See also