For calculating horizontal (X+Z) and vertical (Y) speed in 3D games. In some cases "speed" might be the wrong term, since it's only finding distance traveled. Should be able to remove the horizontal speed part, and use the vertical speed as horizontal in a 2D game.