Tan

tan returns the value of the tangent of an angle expressed in degrees, radians, or grades, depending on adxmda. The type of result is Double.

Syntax

tan(value)

Example

# This function calculates the height of a point considering the ground distance and the angleFunc HEIGHT(ANGLE_VALUE,DISTANCE_VALUE)Value Double ANGLE_VALUE,DISTANCE_VALUEIf abs(ANGLE_VALUE)=acos(0)# value is infinite, we should return an errorElseEnd DISTANCE_VALUE*tan(ANGLE_VALUE)Endif

See also

cos, tan, asin, acos, atan, atan2.