distance
The distance between two points.
distance(a: Val, b: Val): Expr
Import math from shaders/std and use math.distance.
Parameters
| Name | Type | Notes |
|---|---|---|
a | Val | |
b | Val |
Example
const toPointer = distance(uv, params.ctx.pointer)
See also
length— The length of a vector.