Concept Framework 1.0 documentation Contents | Index

standard.C.math.atan

Name Version Deprecated
atan version 1.0 no

Prototype:
number atan(number tangent)

Parameters:
tangent      [in] Value whose arctangent is to be calculated

Description:
Returns the arctangent of tangent in the range of -M_PI/2 to M_PI/2 radians.
If tangent is 0, atan returns 0.

Example:
import standard.C.math


class Main {
function Main() {
var angle;
var radians;
var result;

// Calculate the tangent of 30 degrees.
angle = 30;
radians = angle * M_PI/180;
result = tan(radians);
echo "The tangent of 30 degrees is " + result + ".\n";

// Calculate the arctangent of the previous tangent.
radians = atan(result);
angle = radians * 180/M_PI;
echo "The previous tangent is equivalent to " + ceil(angle) + " degrees.\n";
}
}


Results
The tangent of 30 degrees is 0.57735026918962573.
The previous tangent is equivalent to 30 degrees.

Returns:
Returns the arctangent of tangent in the range of -M_PI/2 to M_PI/2 radians. If tangent is 0, atan returns 0.

Documented by Simona Gabriela Plesuvu, generation time: Thu Oct 15 20:02:03 2009 GMT(c)2009 RadGs Software