linearly v0.32.0Docs


linearly v0.32.0 / vec4 / clamp

Function: clamp()

clamp(a, min, max): vec4

Constrain a value to lie between two further values

Parameters

a: vec4

min: number | vec4

the lower end of the range into which to constrain v

max: number | vec4

the upper end of the range into which to constrain v

Returns

vec4

See

https://thebookofshaders.com/glossary/?search=clampopen in new window

Defined in

src/vec4.ts:344open in new window