Hi there,
I'm dealing with various decimal numbers:
4.6736583758
28.01392764
etc
How would I round numbers such as these up to the nearest whole number? thanks
How to round up to nearest whole number
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 7
- Joined: Tue Oct 30, 2012 11:39 am
Re: How to round up to nearest whole number
Hi Louis,
you'll be surprised (NOT):
put round(4.6736583758) -> 5
put round(28.01392764) -> 28
Check the dictionary for more options of "round"...
Best
Klaus
you'll be surprised (NOT):
put round(4.6736583758) -> 5
put round(28.01392764) -> 28

Check the dictionary for more options of "round"...
Best
Klaus
Re: How to round up to nearest whole number
Hi.
One way to always round to the next highest integer is to;
Craig Newman
One way to always round to the next highest integer is to;
Code: Select all
on mouseup
answer roundUp(msg)
end mouseup
function roundUp var
return round(var + 0.5)
end roundUp