TAN( ) Function

This trigonometric function returns the tangent of an angle.

TAN(nExpression)

Return Value

Numeric

Parameters

  • nExpression
    Specifies the angle in radians for which TAN( ) returns the tangent. To convert an angle from degrees to radians, use DTOR( ). The number of decimal places returned by TAN( ) can be specified with SET DECIMALS.

Example

CLEAR
? TAN(0)  && Displays 0.00
? TAN(PI( )/4)  && Displays 1.00
? TAN(PI( )*3/4)  && Displays -1.00

See Also

Reference

COS( ) Function

DTOR( ) Function

RTOD( ) Function

SET DECIMALS Command

SIN( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)