Maf.js

A library for doin' maf innit. The functions that Math doesn't have, taken from GLSL, HLSL, Unity and other places. GitHub

Every plot below is drawn by calling the functions that it shows, with what each of them does next to it. Move the pointer over a plot to read its values.

Clamping and steps

Mixing and mapping

Shaping

Moving towards a target

Angles

Random and noise

The rest