Cos
The cosine of an angle in radians.
Node id math/cos
The Cos node outputs the cosine of value, an angle in radians: the
horizontal position of a point on a unit circle at that angle. It goes from
1 to -1, and back, once per full turn (2π).
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| value | number | 0 |
Outputs
| Name | Type | Notes |
|---|---|---|
| result | number |
Behaviour
- Radians. Multiply an angle in degrees by PI and divide it by 180 first.
- Points on a circle. For a circle of radius r around (cx, cy), the point at angle a is (cx + r × cos(a), cy + r × sin(a)).
- Invalid math. The cosine of
Infinitygives NaN, with no error.
Related nodes
- Sin: the vertical position on the same circle.
- Tan: sine divided by cosine.
- Vector From Angle: both at once, as a vector.