Skip to content

Trigonometric functions

The <input> and <output> tags of every module on this page additionally accept the attributes common to all analysis modules.

acos

Calculates the inverse cosine of a single input element-wise and writes the resulting angle to a single output buffer. This module will write as many values as there are values in the input buffer. The angle is returned in radians unless degrees are requested using the deg attribute.

<acos deg="BOOLEAN">
    <input as="value">BUFFER</input>
    <output as="acos">BUFFER</output>
</acos>

Attributes

deg
Return the angle in degrees instead of radians.
added in 1.2 optional, boolean, default: false

Inputs

as Count as required Allowed types
value exactly one no buffer, value

Outputs

as Count as required
acos exactly one no

asin

Calculates the inverse sine of a single input element-wise and writes the resulting angle to a single output buffer. This module will write as many values as there are values in the input buffer. The angle is returned in radians unless degrees are requested using the deg attribute.

<asin deg="BOOLEAN">
    <input as="value">BUFFER</input>
    <output as="asin">BUFFER</output>
</asin>

Attributes

deg
Return the angle in degrees instead of radians.
added in 1.2 optional, boolean, default: false

Inputs

as Count as required Allowed types
value exactly one no buffer, value

Outputs

as Count as required
asin exactly one no

atan

Calculates the inverse tangent of a single input element-wise and writes the resulting angle to a single output buffer. This module will write as many values as there are values in the input buffer. The angle is returned in radians unless degrees are requested using the deg attribute.

<atan deg="BOOLEAN">
    <input as="value">BUFFER</input>
    <output as="atan">BUFFER</output>
</atan>

Attributes

deg
Return the angle in degrees instead of radians.
added in 1.2 optional, boolean, default: false

Inputs

as Count as required Allowed types
value exactly one no buffer, value

Outputs

as Count as required
atan exactly one no

atan2

Calculates the two-argument variant of the inverse tangent (corresponding to atan(y/x), see Wikipedia for an explanation) element-wise and writes it to a single output buffer. The angle is returned in radians unless degrees are requested using the deg attribute. Like the other element-wise modules with several inputs, the output has the length of the longest input and a shorter input repeats its last value; any empty input yields an empty output.

<atan2 deg="BOOLEAN">
    <input as="y">BUFFER</input>
    <input as="x">BUFFER</input>
    <output as="atan2">BUFFER</output>
</atan2>

Attributes

deg
Return the angle in degrees instead of radians.
added in 1.2 optional, boolean, default: false

Inputs

as Count as required Allowed types
y exactly one no buffer, value
x exactly one no buffer, value

Outputs

as Count as required
atan2 exactly one no

cos

Calculates the cosine of a single input (in radians) element-wise and writes it to a single output buffer. This module will write as many values as there are values in the input buffer. The module will calculate in radians unless degrees are specified using the deg attribute.

<cos deg="BOOLEAN">
    <input as="value">BUFFER</input>
    <output as="cos">BUFFER</output>
</cos>

Attributes

deg
Interpret the input in degrees instead of radians.
added in 1.2 optional, boolean, default: false

Inputs

as Count as required Allowed types
value exactly one no buffer, value

Outputs

as Count as required
cos exactly one no

cosh

Calculates the hyperbolic cosine of a single input element-wise and writes it to a single output buffer. This module will write as many values as there are values in the input buffer.

<cosh>
    <input as="value">BUFFER</input>
    <output as="cosh">BUFFER</output>
</cosh>

Inputs

as Count as required Allowed types
value exactly one no buffer, value

Outputs

as Count as required
cosh exactly one no

sin

Calculates the sine of a single input (in radians) element-wise and writes it to a single output buffer. This module will write as many values as there are values in the input buffer. The module will calculate in radians unless degrees are specified using the deg attribute.

<sin deg="BOOLEAN">
    <input as="value">BUFFER</input>
    <output as="sin">BUFFER</output>
</sin>

Attributes

deg
Interpret the input in degrees instead of radians.
added in 1.2 optional, boolean, default: false

Inputs

as Count as required Allowed types
value exactly one no buffer, value

Outputs

as Count as required
sin exactly one no

sinh

Calculates the hyperbolic sine of a single input element-wise and writes it to a single output buffer. This module will write as many values as there are values in the input buffer.

<sinh>
    <input as="value">BUFFER</input>
    <output as="sinh">BUFFER</output>
</sinh>

Inputs

as Count as required Allowed types
value exactly one no buffer, value

Outputs

as Count as required
sinh exactly one no

tan

Calculates the tangent of a single input (in radians) element-wise and writes it to a single output buffer. This module will write as many values as there are values in the input buffer. The module will calculate in radians unless degrees are specified using the deg attribute.

<tan deg="BOOLEAN">
    <input as="value">BUFFER</input>
    <output as="tan">BUFFER</output>
</tan>

Attributes

deg
Interpret the input in degrees instead of radians.
added in 1.2 optional, boolean, default: false

Inputs

as Count as required Allowed types
value exactly one no buffer, value

Outputs

as Count as required
tan exactly one no

tanh

Calculates the hyperbolic tangent of a single input element-wise and writes it to a single output buffer. This module will write as many values as there are values in the input buffer.

<tanh>
    <input as="value">BUFFER</input>
    <output as="tanh">BUFFER</output>
</tanh>

Inputs

as Count as required Allowed types
value exactly one no buffer, value

Outputs

as Count as required
tanh exactly one no