This makes sure you get exactly two numbers after the point. If I don't want to round the number I still add a small fractional number instead of 0.5, so that I don't get 5.99 if it really should be 6.00$i= int($i*100+.5)/100;
In reply to Re: for loop with float
by jethro
in thread for loop with float
by RobertCraven
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |