## Key

• This line was added.
• This line was removed.
• Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r089

This example illustrates how to apply basic trigonometric functions to your transformations. All of the functions take inputs in radians.

Source:

In the following sample, input values are in degrees:

X
-30
0
30
45
60
90
120
135
180

Transformation:

In this example, all values are rounded to three decimals for clarity.

First, the above values in degrees must be converted to radians.

D trans
RawWrangle true 'rX' step derive type: single value: round(radians(X), 3) as: 'rX' Formula type Single row formula Formula round(radians(X), 3) New column name New formula

Sine:

D trans
RawWrangle true 'SINrX' step derive type: single value: round(sin(rX), 3) as: 'SINrX' Formula type Single row formula Formula round(sin(rX), 3) New column name New formula

Cosine:

D trans
RawWrangle true 'COSrX' step derive type: single value: round(cos(rX), 3) as: 'COSrX' Formula type Single row formula Formula round(cos(rX), 3) New column name New formula

Tangent:

D trans
RawWrangle true 'TANrX' step derive type: single value: round(tan(rX), 3) as: 'TANrX' Formula type Single row formula Formula round(tan(rX), 3) New column name New formula

Cotangent:

D trans
RawWrangle true 'COTrX' step derive type: single value: round(1 / tan(rX), 3) as: 'COTrX' Formula type Single row formula Formula round(1 / tan(rX), 3) New column name New formula

Secant:

D trans
RawWrangle true 'SECrX' step derive type: single value: round(1 / cos(rX), 3) as: 'SECrX' Formula type Single row formula Formula round(1 / cos(rX), 3) New column name New formula

Cosecant:

D trans
RawWrangle true 'CSCrX' step derive type: single value: round(1 / sin(rX), 3) as: 'CSCrX' Formula type Single row formula Formula round(1 / sin(rX), 3) New column name New formula

Results:

XrXCOTrXSECrXCSCrXTANrXCOSrXSINrX
-30-0.524-1.731.155-1.999-0.5780.866-0.5
00null1null010
300.5241.731.1551.9990.5780.8660.5
450.7851.0011.4141.4150.9990.7070.707
601.0470.5781.9991.1551.7310.50.866
901.5710-4909.8261-4909.82601
1202.094-0.577-2.0011.154-1.734-0.50.866
1352.356-1-1.4141.414-1-0.7070.707
1803.1422454.913-1-2454.9130-10