logo
Home XtGem- Templates- XtScript- bottom
Rounds up or down a floating point number
[...] = optional ... = your value
[var $... = ]call round $num=…[;$mode=…][;$precision=…]
$precision = The optional number of decimal digits to round to.
$mode = what happens to a half(.5)
one of the following
PHP_ROUND_HALF_UP ; default action
PHP_ROUND_HALF_DOWN
PHP_ROUND_HALF_EVEN ; round to the even number
PHP_ROUND_HALF_ODD ; round to the odd number
Show as text
Show as text
Reload
input = 12345.55
output = 12345.6
input = 12345.55
output = 12000
input = 12345.55
output = 12345.5
Powered by XtGem
About us Contact Forum top