Navigation menu

WoW:API ceil: Difference between revisions

Jump to navigation Jump to search
no edit summary
mNo edit summary
No edit summary
Line 1: Line 1:
{{wowapi}}
{{luaapi}}
{{:Lua/Libshortcut|ceil|math.ceil}}
 
ceil(value) returns the ceiling of the value (the next highest whole number) i.e. rounds value ''up''
ceil(value) returns the ceiling of the value (the next highest whole number) i.e. rounds value ''up''
int = math.ceil(n);
int = ceil(n);


== Examples ==
   > print(ceil(3.141592653))
   > print(ceil(3.141592653))
   4
   4
Line 9: Line 10:
   round
   round
   > print(ceil(n - .5))
   > print(ceil(n - .5))
{{LUA}}