Reply
Rounding Numbers up...
Old 08-03-2004, 11:49 PM Rounding Numbers up...
Unknown.

Posts: 1,693
Trades: 0
I suppose this is possible..

What I want to do is be able to round numbers up..

For example. If I have $num as the number...

If $num is greater that 2 it will be rounded up to 3...

Anyone be able to help

Thanks

-James
Dark-Skys99 is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 08-04-2004, 07:05 AM
Kyrnt's Avatar
The Post-Mod Years

Posts: 2,535
Location: Western Maryland
Trades: 0
If you have a float that is at all above 2 and want a function to raise that to three, then use the ceil() function.

It doesn't do rounding. Even if the number is 2.00001, ceil() will raise it to 3. It sounded like that's what you want.
__________________
—Kyrnt
Kyrnt is offline
Reply With Quote
View Public Profile Visit Kyrnt's homepage!
 
Old 08-04-2004, 08:08 AM
Unknown.

Posts: 1,693
Trades: 0
Thanks

-James
Dark-Skys99 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Rounding Numbers up...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.11639 seconds with 13 queries