Math: Difference between revisions
Jump to navigation
Jump to search
(New page: Lua has buildin math functions, that you can use in scripts. <syntaxhighlight lang="lua"> math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.cosh math.deg math.exp...) |
No edit summary |
||
Line 1: | Line 1: | ||
Lua | Math is a built-in Lua library which containts mathematical functions and constants that you can use in scripts. | ||
* [http://www.lua.org/manual/5.2/manual.html#pdf-math.abs math.abs] | |||
math.abs | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.acos math.acos] | ||
math.acos | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.asin math.asin] | ||
math.asin | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.atan math.atan] | ||
math.atan | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.atan2 math.atan2] | ||
math.atan2 | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.ceil math.ceil] | ||
math.ceil | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.cos math.cos] | ||
math.cos | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.cosh math.cosh] | ||
math.cosh | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.deg math.deg] | ||
math.deg | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.exp math.exp] | ||
math.exp | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.floor math.floor] | ||
math.floor | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.fmod math.fmod] | ||
math.fmod | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.frexp math.frexp] | ||
math.frexp | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.huge math.huge] (constant) | ||
math.huge | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.ldexp math.ldexp] | ||
math.ldexp | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.log math.log] | ||
math.log | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.log10 math.log10] | ||
math.log10 | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.max math.max] | ||
math.max | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.min math.min] | ||
math.min | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.modf math.modf] | ||
math.modf | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.pi math.pi] (constant) | ||
math.pi | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.pow math.pow] | ||
math.pow | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.rad math.rad] | ||
math.rad | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.random math.random] | ||
math.random | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.randomseed math.randomseed] | ||
math.randomseed | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.sin math.sin] | ||
math.sin | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.sinh math.sinh] | ||
math.sinh | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.sqrt math.sqrt] | ||
math.sqrt | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.tanh math.tanh] | ||
math.tanh | * [http://www.lua.org/manual/5.2/manual.html#pdf-math.tan math.tan] | ||
math.tan | |||
==See Also== | ==See Also== | ||
*[http://lua-users.org/wiki/MathLibraryTutorial Math examples on the LUA Wiki] | * [http://lua-users.org/wiki/MathLibraryTutorial Math examples on the LUA Wiki] | ||
[[Category:Scripting Concepts]] | [[Category:Scripting Concepts]] |
Revision as of 18:18, 10 April 2012
Math is a built-in Lua library which containts mathematical functions and constants that you can use in scripts.
- math.abs
- math.acos
- math.asin
- math.atan
- math.atan2
- math.ceil
- math.cos
- math.cosh
- math.deg
- math.exp
- math.floor
- math.fmod
- math.frexp
- math.huge (constant)
- math.ldexp
- math.log
- math.log10
- math.max
- math.min
- math.modf
- math.pi (constant)
- math.pow
- math.rad
- math.random
- math.randomseed
- math.sin
- math.sinh
- math.sqrt
- math.tanh
- math.tan