Lua acos()
Anonymous contributor
Published Oct 14, 2023
Contribute to Docs
The acos() method of the Lua math library returns the arc cosine of the argument, in radians.
Syntax
math.acos(x)
Where -1 <= x <= 1.
Example
The code below will print the arc cosine of 0.5 to the console.
print(math.acos(0.5))
The output will be:
1.0471975511966
All contributors
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Lua on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours
- Learn the basics of Lua, a general-purpose programming language used for building games, web apps, and developer tools.
- Beginner Friendly.4 hours