Re: Rounding
| From: | Steve Keller | Date: | Thu, 20 Feb 2003 22:55:08 +0000 |
| Subject: | Re: Rounding | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136428@lists.php.net to get a copy of this message | ||
At 2/21/2003 05:29 AM, Jason Wong wrote:
To round to the nearest 5: Divide by 5 Round to the nearest integer Multiply by 5Modulus by 5 Subtract the result from the original number. Of course, my way depends on whether you're rounding up or down. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: skeller@healthtvchannel.org Web: www.healthtvchannel.org