The atan() function in p5.js is used to calculate the inverse of tan() or arc tangent of a value ranging in between -Infinity to Infinity (exclusive) and gives result in the range of -π/2 to π/2.
Parameters: This function accepts a parameter “P” which is a value ranging from -1 to 1 and whose arc tangent is calculated.
Return Value: It returns the arc tangent of a value and its range is in between -π/2 to π/2.
Below program illustrates the atan() function in p5.js:
Example: This example uses atan() function to get arc tangent of a value.
- 5 Must Have Tools For Web Application Penetration Testing
- TCS Digital Interview through Codevita'19
- CSS | perspective() Function
- PHP | Imagick levelImage() Function
- Why Serverless Apps?
- BabyChakra Interview Experience
- How to place the image above the slider in mobile view in bootstrap?
- How to get the same behavior with confirm and bootstrap modal?
- Web DOMRect API | DOMRect() Constructor
- CSS | skewX() Function
- PHP | IntlChar foldCase() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.