MathUtils class for somewhat optimised mathematical operations.