WoW:API ceil: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
{{luaapi}}
{{wowlua}}
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 = math.ceil(n);

Revision as of 07:36, 19 September 2013

WoW Lua

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))
 4
 round
 > print(ceil(n - .5))