Blog > Formulas

Formulas

Random math formulas that I found to be useful or cool

sin(x) • cos(2x) Creates a sine wave that sort of hesitates and gets flatter around 0
2 / (2 ^ n) For each iteration this'll return half of the last value
n1 * (1 - amount) + n2 * amount lerp (also called "mix")
max(min_val, min(val, max_val)) clamp