Re: New math function submission: round_to()
| From: | André Langhorst | Date: | Thu, 14 Sep 2000 11:07:54 +0000 |
| Subject: | Re: New math function submission: round_to() | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-33232@lists.php.net to get a copy of this message | ||
Following a question on the php-general list, I hacked this up. It takes two numbers and returns the first number rounded to the nearest integer multiple of the absolute value of the second. For instance, round_to(1120, 50) returns 1100, round_to(156, 50) returns 150, etc.good idea, would be nice if it´d support values <1 for the "multiple" param too andré