.Atan()

Published Mar 25, 2023
Contribute to Docs

Math.Atan() is a static method that calculates the inverse tangent of a given number, in radians.

Syntax

Math.Atan(x);
  • The Math.Atan() method takes one double as an argument and returns a double.
  • Using this method requires the System namespace.

Codebyte Example

The following example uses Math.Atan() to return the arctangent of a right angled triangle, where the side opposite the angle is equal to 7, and the side adjacent is 5.

Code
Output
Loading...

All contributors

Looking to contribute?

Learn C# on Codecademy