miscellaneous mathematical and physics routines for game programming