Last updated March 2020
ec_round — round away from zero
ec_round rounds the given number to the nearest integer, but away from 0.
$a = 65.43; $b = -41.65; $c = 43; $rounda = ec_round $a; $roundb = ec_round $b; $roundc = ec_round $c; #rounda is 66.000000 #roundb is -42.000000 #roundc is 43.000000
Was this page helpful?