roger.e.eller at sealedair.com
Tue Nov 22 15:15:33 CET 2016
We have round, which will either round up or down depending on the decimal
value being > or < .5, but what if I want ANY decimal value, even .01 to
round UP to the next whole number?
the round of 26.2 -- yields 26
the round of 2.5 -- yields 3 (rounds up)
I want to:
get roundUP(26.2) -- yields 27
set the itemDel to "."
--------- I could just evaluate what falls after the decimal.
if item 2 of MyDecimalNum > 0 then
add 1 to item 1 of MyDecimalNum
put 0 into item 2 of MyDecimalNum
Is there a better way? Probably, I'm guessing...
More information about the use-livecode