Re: Find Next Integer

From: Date: Mon, 09 Dec 2002 21:08:52 +0000
Subject: Re: Find Next Integer
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-127553@lists.php.net to get a copy of this message
Well that case then if ($sign = ">") ceil($number); else floor($number); Is that nearer to what you mean? Andrew ----- Original Message ----- From: "Stephen" <webmaster@melchior.us> To: "Andrew Brampton" <andrew@bramp.freeserve.co.uk> Cc: "PHP List" <php-general@lists.php.net> Sent: Monday, December 09, 2002 8:19 PM Subject: Re: [PHP] Find Next Integer > But the problem is, the user may type in a decimal.. I guess I could round > then add or subtract.. Would that work too? > > > ----- Original Message ----- > From: "Andrew Brampton" <andrew@bramp.freeserve.co.uk> > To: "Stephen" <webmaster@melchior.us> > Sent: Monday, December 09, 2002 1:14 PM > Subject: Re: [PHP] Find Next Integer > > > > if ($sign = ">") > > $number++; > > else > > $number--; > > > > ??? > > ----- Original Message ----- > > From: "Stephen" <webmaster@melchior.us> > > To: "PHP List" <php-general@lists.php.net> > > Sent: Monday, December 09, 2002 5:05 PM > > Subject: [PHP] Find Next Integer > > > > > > > I have yet another math question. How could you find the next integer of > a > > > number specified? Then how could you tell it to go up or down depending > on > > > if the greater then or less tehn sign was chosen by the user? > > > > > > Thanks, > > > Stephen Craton > > > http://www.melchior.us > > > > > > "What is a dreamer that cannot persevere?" -- > > > http://www.melchior.us > > > > > > > > > > > > -------------------------------------------------------------------------- > -- > > ---- > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > >

« previous php.general (#127553) next »