Languages
[Edit]
EN

JavaScript - Math.acos() method example

8 points
Created by:
Root-ssh
177980

The Math.acos function returns number in radians in the range 0 to Math.PI. Based on this function we are able to calculate inverted cosine function value.

 Another way to look at acos function:


1. Documentation

Edit
SyntaxMath.acos(number)
Parameters

number - integer or float number value that represents result of operation adjacent / hypotenuse on right triangle (primitive value).

number should be in the range -1 to +1.

Result

number value in radians in the range 0 to Math.PI (primitive value).

If value can not be calculated NaN is returned.

Description

acos is a static method that takes only one parameter and returns an approximation of the result of the mathematical function arccosine(x).


2. Working with degrees

Edit

3. Canvas plot example

Edit

References

Edit
  1. Inverse trigonometric functions - Wikipedia

Alternative titles

  1. JavaScript - Math.acos() documentation with examples
  2. js - Math.acos() method documentation with examples
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Cross technology - Math.acos()

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join