Write your own. :)

Here's a floor and ceiling function.


-- Floor & Ceiling v1.1 -- 020607 roymeo(@)brokenoffcarantenna.com -- Director 8.5

-- USAGE/DESCRIPTION:
-- Floor (round any non-integer down) and Ceiling (round any non-integer up) fn's
-- returns the integer value
-- REQUIRES:
-- nothing
-- CAST CONVENTIONS:
-- none
-- SCORE CONVENTIONS:
-- none
-- USEFUL MESSAGES:
-- Floor(float)
-- Ciling(float)
-- PARAMETERS:
-- none
-- OWNER: roymeo
-- HISTORY/NOTES:
-- 010426-roymeo v1.0 from mare(@)pop.bart.nl
-- 020607-roymeo v1.1 corrected ceiling function in response to Lingo-L question


-- PROPERTIES
--none

-- HANDLERS
on floor x
  return integer(x - .5)
end

on ceiling x
  if x <> integer(x) then
    return (floor(x) + 1)
  else
    return integer(x)
  end if
end


roymeo


At 10:10 AM 1/26/2004, you wrote:
Hi all...

I want to automatically convert a float to the next highest integer.
Flash has the Math.ceil() method, so what's the most efficient way to do
this in Lingo?

I appreciate any responses, and have a superb day.

Thanks,
Michael M.


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

---------- roymeo(AT)brokenoffcarantenna.com ---------- i used to love you back when you wrote poetry

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to