WoW:API floor: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
==Description== | ==Description== | ||
floor(value) returns the floor of the value (essentially it returns the whole | floor(value) returns the floor of the value (essentially it returns the whole part of the value) i.e. rounds value ''down'' | ||
==Example== | ==Example== |
Revision as of 01:10, 26 April 2006
math.floor
Usage
val = floor(value);
Description
floor(value) returns the floor of the value (essentially it returns the whole part of the value) i.e. rounds value down
Example
> local x = floor(10.9); > = x 10
-- Rounding using floor() > local x = floor(value + .5)