Math problem
Ken Ray
kray at sonsothunder.com
Sat Feb 18 12:01:32 EST 2012
> function roundUp x
> return trunc(x) + char itemoffset((x mod 1 > 0),"true,false") of "10"
> end roundUp
VERY clever, Peter!
That's a great one-line variant to:
function roundUp x
put trunc(x) into tRetVal
if x mod 1 > 0 then add 1 to tRetVal
return tRetVal
end roundUp
:D
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list