At 8:28 PM +0100 4/13/05, David Burgun wrote:
no, use:

trunc(1.5)+1

Thanks! There should be a mention of this on the round and statRound documentation pages!

There's a See Also link to the cookbook recipe for "Rounding a number up to a ceiling". (Or at least there used to be.) The function given there looks like this:


function ceiling theNumber
  if theNumber is not a number then return "Error: not a number"
  if theNumber < zero or theNumber is an integer then
    return trunc(theNumber)
  else
    return trunc(theNumber) + 1
  end if
end ceiling

which is more verbose than the equivalents that have been given here, but also, I think, a little easier to figure out for beginners.
--
jeanne a. e. devoto ~ [EMAIL PROTECTED]
http://www.jaedworks.com
_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to