Compartir a través de


ATAN( ) Function

Returns in radians the arc tangent of a numeric expression.

ATAN(nExpression)

Return Value

Numeric

Parameters

  • nExpression
    Specifies a numeric expression whose arc tangent ATAN( ) returns. nExpression can be any value. The value returned by ATAN( ) can range from –pi/2 through +pi/2 (–1.57079 to 1.57079). The number of decimal places displayed in the value returned by ATAN( ) is determined by SET DECIMALS.

Remarks

Use RTOD( ) to convert radians to degrees.

Example

CLEAR
? ATAN(0)  && Displays 0.00
STORE PI( )/2 to gnAngle
? ATAN(gnAngle)  && Displays 1.00
? ATAN(PI( )/2)  && Displays 1.00
? ATAN(DTOR(90))  && Displays 1.00

See Also

Concepts

Creating Numeric Expressions

Reference

ATN2( ) Function

RTOD( ) Function

SET DECIMALS Command

TAN( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)