cos
The cosine of an angle in radians, −1..1.
cos(x: Val): Expr
Import math from shaders/std and use math.cos.
Parameters
| Name | Type | Notes |
|---|---|---|
x | Val |
Example
const spun = rotate2(delta, cos(angle), sin(angle))
Tip. A degrees prop needs
mul(angle, 0.017453292519943295)first.
See also
Used by
Chrome, Crystal, FlowingGradient, Goo, MeshGradient, ReactionDiffusion, Voxels