Skip to content

Mathematics

The math under game code: rotations, interpolation and deterministic randomness.

3 cheat sheets · 3 subcategories

Rotations

Representing and blending orientation in 3D.

Interactive visual
core

Quaternions

four numbers that rotate without gimbal lock

A unit quaternion stores a 3D rotation as an axis and half-angle. It composes cheaply, never gimbal-locks and slerps along the shortest arc.

Interpolation

Turning linear progress into motion that feels right.

Interactive visual
core

Easing Functions

bend linear progress into motion with weight

An easing function remaps progress t from 0..1 so motion accelerates, decelerates, overshoots or bounces instead of moving at a robotic constant speed.

Procedural

Seeds, noise and reproducible generated worlds.

Interactive visual
common

Seeded Noise

same seed in, same world out, every time

A seeded PRNG plus gradient noise and fBm turns one integer into an endless, smooth, repeatable world: same seed, same terrain on every machine.