WoW:API ceil: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API ceil to API ceil without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{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 = ceil(n);


{{Template:WoW API}}
== Examples ==
  > print(ceil(3.141592653))
  4
 
  round
  > print(ceil(n - .5))

Latest revision as of 04:45, 15 August 2023

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[edit]

 > print(ceil(3.141592653))
 4
 round
 > print(ceil(n - .5))