Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Copy Text - Non Editable Fields & Shockwave
SpritePulsator
GetSoundLevel
3state Button with Cursor change
Precision Xtra
WinDirs XObject
Convert between bases-String to Integer
Sound 1 CuePoint
Font Style Change
Grabber
MediaMacros Xtras Mall
 

 

 

Behavior Ceiling and floor math functions

Added on 1/14/2006

 

Compatibilities:
behavior D7 D8 D8_5 D9 Mac PC

This item has not yet been rated

Author: Chunick (website)

These two are math functions. They should be placed in a movie script. ceil() - The ceiling of a number is the closest integer that is greater than or equal to the number. floor() - The floor is the closest integer that is less than or equal to the specified number or expression. These have been tested and work for both positive and negative values.

on ceil(x)
  return bitOr(x,0) + ((x>0) + (x <> integer(x)) = 2)
end

on floor(x)
  return bitOr(x,0) - ((x<0) + (x <> integer(x)) = 2)
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail