Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Get Line Number of Word
Blinker
Useful list functions
Creating an object that simulates an array
Doutone-Alphamania
TrackTheColors Xtra Error
Mac Drive
Enable/Disable FullScreen of DirectMedia Sprite
Sprite on/off
XCursor xtra
 

 

 

Behavior Ceiling and Floor

Added on 3/28/2003

 

Compatibilities:
D6_5 D7 D8 D8_5 D9 Mac PC Shockwave

This item has not yet been rated

Author: MediaMacros (website)

Ceiling rounds up to the nearest integer. Floor rounds down

on ceiling f
  int = integer( f )
  if int = f then
     return int
  else if( f > 0 ) then
    return integer( f + .5 )
  else
    return integer( f - .5 )
  end if
end

on floor f
  int = integer(f)
  if int = f then return int
else if( f > 0 ) then
    return integer( f -.5 )
  else
    return integer( f + .5 )
  end if
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail