From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Global Method

Atan(value As Double) As Double

Supported for all project types and targets.

Returns the arctangent of the value specified. The arctangent is the angle whose tangent is value.


result = Atan(value)

Part Type Description
result Double The arctangent of value.
value Double The value you want the arctangent of.


The Atan function returns the angle (in radians) of the number passed to it. To express the arctangent in degrees, multiply the result by 180/PI.


This example uses the Atan function to return the arc tangent of a number.

Var d As Double
Const Pi = 3.14159265358979323846264338327950
d = Atan(1) // returns 0.785398 (PI/4 radians)
d = Atan(1) * 180 / Pi // returns 45

See Also

Atan2, Tan functions