https://retstak.org/2009/11/18/a-quick-bit-of-math/
A quick bit of math