Implemented most of GML's math functions