WoW:API floor

From AddOn Studio
Revision as of 04:45, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API floor to API floor without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW Lua


val = math.floor(value)
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)