Reference to the trigonometric functions
Summary
Performs the indicated trigonometric function on each data value described by tsExpression
.
Function Syntax | Description | Input Values | Return Values | Math Notation |
---|---|---|---|---|
sin(<tsExpression>) |
Sine | Radians | Ratio of opposite/hypotenuse sides for an angle of Θ radians. | sin Θ |
cos(<tsExpression>) |
Cosine | Radians | Ratio of adjacent/hypotenuse sides for an angle of Θ radians. | cos Θ |
tan(<tsExpression>) |
Tangent | Radians | Ratio of opposite/adjacent sides for an angle of Θ radians. | tan Θ |
asin(<tsExpression>) |
Arcsine Inverse of sin() |
Ratio of sides. Number -1 < x < 1 |
Radians in the angle for a given ratio of opposite/hypotenuse sides. | asin x |
acos(<tsExpression>) |
Arccosine Inverse of cos() |
Ratio of sides. Number -1 < x < 1 |
Radians in the angle for a given ratio of adjacent/hypotenuse sides. | acos x |
atan(<tsExpression>) |
Arctangent Inverse of tan() |
Ratio of sides | Radians in the angle for a given ratio of opposite/adjacent sides. | atan x |
atan2(<y-tsExpression>, <x-tsExpression>) |
Arctangent Alternative to atan() |
y and x coordinates | Radians in the angle for a ratio of y and x coordinates. | atan y / x |
sinh(<tsExpression>) |
Hyperbolic sine | Number | (ex - e-x)/2 | sinh x |
cosh(<tsExpression>) |
Hyperbolic cosine | Number | (ex + e-x)/2 | cosh x |
tanh(<tsExpression>) |
Hyperbolic tangent | Number | (sinh x )/(cosh x ) |
tanh x |
Parameters
Parameter | Description |
---|---|
tsExpression | Expression describing input values that are interpreted as indicated in the table above. Note: You can use toRadians() to convert values from numbers of degrees to numbers of radians. |
y-tsExpression, x-tsExpression | Used in atan2() . Expressions describing values that represent pairs of y and x coordinates. |
Description
Each trigonometric function produces data points by performing a calculation on the data points returned by the input expression.
- If
tsExpression
is a constant, then the function returns a continuous series. - If
tsExpression
describes one or more time series, then the function returns a new time series for each input time series. Each value in a new time series is obtained by operating on the value of the corresponding point in the input time series.