Posted by Hero Wanders on 08/28/05 19:13
Hello!
>>That *rounds* the value instead of returning the float with only the
>>last to digits of it (ok actually Thierry asked for a function which
>>returns *a* float (function give($float) { return 3.14; } would do
>>it)).
>
> When you would have bothered to look at the manual page, you would have
> noticed that the round function accepts an optional second argument to
> indicate the precision.
I knew this argument but the function still *rounds*.
That means:
3.145 --> 3.15
3.144 --> 3.14
My function gives:
3.145 --> 3.14
3.144 --> 3.14
Greetings,
Hero
Navigation:
[Reply to this message]
|