php - Rounding Mechanism to nearest 0.05 -
I want to solve the sphere system using php4,5.2 and below (5.3 not) Currently I make 0.05 goals I am, some like this page:
before the goal. 89.90 after the round 89.90 89.91 | 89.90 89.92 | 89.90 89.93 | 89.95 89.94 | 89.95 89.95. 89.95 89.96 | 89.95 89.97 | 89.95 89.98 90.00 89.99 | 90.00
I try to use the string to split it and add it manually, but there really is not a good solution, here it is hoping someone solves it To find out.
Use this function
function rndfunc ($ x) {Return goal ($ x * 2, 1) / 2; }
Comments
Post a Comment