Math: Difference between revisions
Jump to navigation
Jump to search
m (Fixed a typo. It should be randomseed and not random itself.) |
|||
Line 37: | Line 37: | ||
==See Also== | ==See Also== | ||
* [http://lua-users.org/wiki/MathLibraryTutorial Math examples on the | * [http://lua-users.org/wiki/MathLibraryTutorial Math examples on the Lua wiki.] | ||
[[Category:Scripting Concepts]] | [[Category:Scripting Concepts]] |
Latest revision as of 07:49, 8 June 2024
Math is a built-in Lua library which contains 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
Do this beforehand to improve randomness:
math.randomseed(os.time())