You probably want to correctly round rather than truncating. E.g. $intval= int(0.5 + $floatval);.
—John
In reply to Re: Re: Re: floating points and sprintf
by John M. Dlugosz
in thread floating points and sprintf
by kennethwlangley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |