Universeorange.com/Docs/

R3m/framework Function reference math.round

{math.round(Float $value, Int $precision=0, $mode=PHP_ROUND_HALF_UP)}

Returns the rounded value of value to specified precision (number of digits after the decimal point). Precision can also be negative or zero (default).

$mode

Use one of the following constants to specify the mode in which rounding occurs.
Constants           Description
PHP_ROUND_HALF_UP   Rounds value away from zero when it is half way there, making 1.5 into 2 and -1.5 into -2.
PHP_ROUND_HALF_DOWN Rounds value towards zero when it is half way there, making 1.5 into 1 and -1.5 into -1.
PHP_ROUND_HALF_EVEN Rounds value towards the nearest even value when it is half way there, making both 1.5 and 2.5 into 2.
PHP_ROUND_HALF_ODD  Rounds value towards the nearest odd value when it is half way there, making 1.5 into 1 and 2.5 into 3. 

Returns the value rounded to the given precision as a float.

More information:

https://www.php.net/manual/en/function.round.php

Last modified: 2021-06-07

© 2021 universeorange.com