|
Trigonometric Functions
GPP supports a wide array of numeric trigonometric functions. They take one or two arguments, and return a numerical value.
In trigonometric functions, all angles are expressed in degrees. This is true for function arguments (for example, for SIN), as well as function return values (for example, for ASIN).
Function arguments are enclosed in parentheses. When two arguments are required, they must be separated by a comma.
SIN(<num-expr>) Sine
ASIN(<num-expr>) Arc sine (return angle, in degrees)
COS(<num-expr>) Cosine
ACOS(<num-expr>) Arc cosine (return angle, in degrees)
TAN(<num-expr>) Tangent
ATAN(<num-expr>) Arc tangent (return angle, in degrees)
SINH(<num-expr>) Hyperbolic Sine
COSH(<num-expr>) Hyperbolic Cosine
TANH(<num-expr>) Hyperbolic Tangent
ATAN2(<num-expr>, <num-expr>) New - two-argument Arc tangent (Y, X)
Note the order of arguments to the ATAN2 function - the Y value comes before the X value. ATAN2 allows users to get an accurate angle (including the quadrant) if the X and Y components are known (unlike ATAN that cannot identify the right quadrant).
|