Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:Lua functions
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Math === Most of these functions are shorthand references to the Lua math library (which is available via "math.", see [http://lua-users.org/wiki/MathLibraryTutorial MathLibraryTutorial] for more info). The trigonometry functions are not just references; they have degree→radian conversion wrappers. Blizzard's versions work with degrees. Lua's standard math library works with radians. : [[API abs|abs]](value) - Returns the absolute value of the number. : [[API acos|acos]](value) - Returns the arc cosine of the value in degrees. : [[API asin|asin]](value) - Returns the arc sine of the value in degrees. : [[API atan|atan]](value) - Returns the arc tangent of the value in degrees. : [[API atan2|atan2]](y, x) - Returns the arc tangent of Y/X in degrees. : [[API ceil|ceil]](value) - Returns the ceiling of value. : [[API cos|cos]](degrees) - Returns the cosine of the degree value. : [[API deg|deg]](radians) - Returns the degree equivalent of the radian value. : [[API exp|exp]](value) - Returns the exponent of value. : [[API floor|floor]](value) - Returns the floor of value. : [[API frexp|frexp]](num) - Extract mantissa and exponent from a floating point number. : [[API ldexp|ldexp]](value, exponent) - Load exponent of a floating point number. : [[API log|log]](value) - Returns the natural logarithm (log base e) of value. : [[API log10|log10]](value) - Returns the base-10 logarithm of value. : [[API max|max]](value[, values...]) - Returns the numeric maximum of the input values. : [[API min|min]](value[,values...]) - Returns the numeric minimum of the input values. : [[API mod|mod]](value,modulus) - Returns floating point modulus of value. : [[API rad|rad]](degrees) - Returns the radian equivalent of the degree value. : [[API random|random]]([ [lower,] upper]) - Returns a random number (optionally bounded integer value) : [[API sin|sin]](degrees) - Returns the sine of the degree value. : [[API sqrt|sqrt]](value) - Return the square root of value. : [[API tan|tan]](degrees) - Returns the tangent of the degree value.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)