linearly v0.32.0Docs


linearly v0.32.0 / vec2 / mod

Function: mod()

mod(a, b): vec2

Compute value of one parameter module another. This is computed as x - y * floor(x/y). Unlike JavaScript’s % operator, the sign of result always matches to b.

Parameters

a: vec2

b: number | vec2

Returns

vec2

See

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

Defined in

src/vec2.ts:265open in new window