At some point, you are likely going to need to change some numbers around. Many mathematical functions such as sine or cosine are provided by Lua. To better understand the provided functions, this section will review Lua's math library.
math
Trigonometry
Some interactive applications such as games rely heavily on trigonometry. Trigonometry is used to figure out the distance between two points, to render a world, and much more. Lua provides the following trig functions. Remember, all of these functions return radians, not degrees:
- math.acos(v): returns the inverse cosine of a number in radians
- math.asin(v): returns...