note 51748 deleted from function.round by nlopess
| From: | nlopess@php.net | Date: | Sat, 09 Apr 2005 19:03:28 +0000 |
| Subject: | note 51748 deleted from function.round by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-87765@lists.php.net to get a copy of this message | ||
Note Submitter: bobson at oak dot pl
Reason: useless
----
I rewrite rounding function to not to use php round(). Seems to work properly.
function myRound($val,$d){
$dd = pow(10,$d);
$f = 0.5/$dd;
return ((int) (($val+$f)*$dd))/$dd;
};