sqrt
The square root of a value.
sqrt(x: Val): Expr
Import math from shaders/std and use math.sqrt.
Parameters
| Name | Type | Notes |
|---|---|---|
x | Val |
Example
const dist = sqrt(add(mul(dx, dx), mul(dy, dy)))
The square root of a value.
sqrt(x: Val): Expr
Import math from shaders/std and use math.sqrt.
| Name | Type | Notes |
|---|---|---|
x | Val |
const dist = sqrt(add(mul(dx, dx), mul(dy, dy)))