Added some maths utilities