Expanding Math Functions

More math functions for the game.