switch out primitive math functions for gosu methods