Math: Trig

Nodes in this category perform trigonometric operations such as sine, cosine, tangent, and their inverses.

Nodes

NodeDetailsPossible Types
Cosine

The cosine trigonometric function (cos) calculates the ratio of the angle's adjacent side length to its hypotenuse length.

With a vec2 input, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Vec2 → Vec2
Vec2[] → Vec2[]
Cosine Inverse

The inverse cosine trigonometric function (acos) calculates the angle whose cosine is the input value.

Number → Number
Number[] → Number[]
Sine

The sine trigonometric function (sin) calculates the ratio of the angle's opposite side length to its hypotenuse length.

With a vec2 input, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Vec2 → Vec2
Vec2[] → Vec2[]
Sine Inverse

The inverse sine trigonometric function (asin) calculates the angle whose sine is the input value.

Number → Number
Number[] → Number[]
Tangent

The tangent trigonometric function (tan) calculates the ratio of the angle's opposite side length to its adjacent side length.

With a vec2 input, this applies separately to the X and Y components.

Number → Number
Number[] → Number[]
Vec2 → Vec2
Vec2[] → Vec2[]
Tangent Inverse

The inverse tangent trigonometric function (atan or atan2, depending on input type) calculates:

atan: the angle whose tangent is the input scalar number.

atan2: the angle of a ray from the origin to the input vec2.

The resulting atan angle is always in the range [-90°, 90°] or, in radians, [-π/2, π/2].

The resulting atan2 angle is always in the range [-180°, 180°] or, in radians, [-π, π].

Number → Number
Number[] → Number[]
Vec2 → Number
Vec2[] → Number[]