Main Index : Reference :

atan()


Description

Calculates the arc tangent value (abbreviated atan) of a value.

Definition

[float] atan([float,int] x)

Parameters

x is a numeric value.

Return Value

atan() returns the arc tangent value of x. This will be an angle measured in radians. (360° = 2p radians) Arc tangent is the inverse function of tangent. For more information on the arc tangent function, please refer to a math book.

Example

// Outputs "atan(x) = -0.197396".

var x = -0.2;
var a = atan(x);

println("atan(x) = ",a);


// To convert an angle given in radians to degrees one can
// simply use the SDK function Degree().
//
// Outputs "atan(1.0) = 45.0000°".

var x = 1.0;
var a = Degree(atan(x));

println("atan(1.0) = ",a,"°");

See Also

tan(), Degree()