Languages
[Edit]
EN

JavaScript - Math.tan() method example

2 points
Created by:
Evania
584

Math.tan() is static method that takes only one parameter and returns approximated value of tangent mathematical function. 

Note: 0.9999999999999999, 16331239353195370, -0.9999999999999999 and -16331239353195370 should be equal to 1+Inf, -1 and -Inf but they are not because of compuptation precision error.


1. Documentation

Edit
SyntaxMath.tan(number)
Parametersnumber - integer or float number value in radians (primitive value).
Resultnumber value calculated as tan(x) mathematical function (primitive value).
DescriptionMath.tan() is static method that takes only one parameter and returns approximated value of tangent mathematical function.

2. Working with radians

Edit

3. Working with degrees

Edit

4. Reversed console plot example

Edit

5. Canvas plot example

Edit

See also

Edit
  1. JavaScript - Math.atan() method example
  2. JavaScript - Math.atan2() method example

References

Edit
  1. Trigonometric functions - Wikipedia

Alternative titles

  1. JavaScript - tangent function example
  2. JavaScript - Math.tan() documentation with examples
  3. js - Math.tan() 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.tan()

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