Skip to main content Link Search Menu Expand Document (external link)

atan() : Arctangent (Inverse Tangent)


On this page

Summary

Calculate the arctangent (inverse tangent) of a value, returning the angle in radians.

Signature

atan(value)

Parameters

Parameter Type Required Description
value Number Yes The tangent value

Returns

Type: Double

The angle in radians (between -π/2 and π/2).


Examples

Basic Arctangent

<p>atan(1) =  radians</p>
<p>atan(1) = °</p>

Output:

<p>atan(1) = 0.785 radians</p>
<p>atan(1) = 45.0°</p>

Find Angle from Slope

<p>Angle: °</p>

Data:

doc.Params["model"] = new {
    rise = 5.77,
    run = 10
};

Output:

<p>Angle: 30.0°</p>

Calculate Bearing

<p>Bearing: °</p>

Notes

  • Accepts any numeric value
  • Returns angle in radians
  • Result range: -π/2 to π/2
  • Inverse of tan() function
  • For degrees, use: degrees(atan(value))

See Also