MCPcopy
hub / github.com/rdev/liquid-glass-react / smoothStep

Function smoothStep

src/shader-utils.ts:15–18  ·  view source on GitHub ↗
(a: number, b: number, t: number)

Source from the content-addressed store, hash-verified

13}
14
15function smoothStep(a: number, b: number, t: number): number {
16 t = Math.max(0, Math.min(1, (t - a) / (b - a)))
17 return t * t * (3 - 2 * t)
18}
19
20function length(x: number, y: number): number {
21 return Math.sqrt(x * x + y * y)

Callers 1

shader-utils.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected