Re: Rounding down?

From: Date: Sat, 22 Aug 2009 14:16:41 +0000
Subject: Re: Rounding down?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-297080@lists.php.net to get a copy of this message
Hi, > It should be round() and not floor(). > > 449 / 50 = 8.98 > floor(8.98) = 8 > 8 * 50 = 400 > > round(8.98) = 9 > 9 * 50 = 450 Not based on the examples given: > Example: Any number between 400 and 449 I would 400 to be displayed -- Richard Heyes HTML5 graphing: RGraph - www.rgraph.net (updated 8th August) Lots of PHP and Javascript code - http://www.phpguru.org

« previous php.general (#297080) next »