sin

The sine of an angle in radians, −1..1.

sin(x: Val): Expr

Import math from shaders/std and use math.sin.

Parameters

NameTypeNotes
xVal

Example

const wave = sin(add(mul(uv.member('x'), 12), time))

Tip. A degrees prop needs mul(angle, 0.017453292519943295) first.

See also

  • cos — The cosine of an angle in radians, −1..1.
  • tan — The tangent of an angle in radians.

Used by

BrushedMetal, CarbonFiber, Chrome, Crystal, FlowingGradient, Frost, Goo, Hologram, Holographic, LiquidMetal, Marble, MeshGradient, ReactionDiffusion, Voxels, Water