Re: Math Question
| From: | Jeremy Schroeder | Date: | Wed, 11 Feb 2004 14:55:53 +0000 |
| Subject: | Re: Math Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177390@lists.php.net to get a copy of this message | ||
Thanks for all the help, floor() was the correct choice for this problem .
-Blake
Vincent Jansen wrote:
Hi Richard I agree.... But you always want to round down ;) Blake> Is there a function that when you divide 2 numbers you drop the Blake> remainder and are left with the whole number. Still seems floor() to me Vincent -----Original Message----- From: Richard Davey [mailto:rich@launchcode.co.uk] Sent: woensdag 11 februari 2004 15:23 To: Vincent Jansen Cc: php-general@lists.php.net Subject: Re[2]: [PHP] Math Question Hello Vincent, Wednesday, February 11, 2004, 2:15:15 PM, you wrote: VJ> Seems to me you need VJ> floor($number1 / $number2) Only if you always want to round *down* the equation. For example flooring a result of 4.99 will give you an integer of 4 whereas round() (or ceil()) will give you 5. It depends on the situation as to which is most useful.