distance

The distance between two points.

distance(a: Val, b: Val): Expr

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

Parameters

NameTypeNotes
aVal
bVal

Example

const toPointer = distance(uv, params.ctx.pointer)

See also

  • length — The length of a vector.