Hacker News new | ask | show | jobs
by Too 798 days ago
In 2D, the diagonal across a 1x1 rectangle is longer than just its sides.

A naive implementation of just adding the x and y vectors together will become their sum, totaling up to the diagonal length, 1.41x faster. In 3d even more.

This is a very common bug (feature) in many old games.

Quake famously did consider this bug while walking but not while jumping, leading to a more complicated trick to speed up called strafe-jumping.