Added a magnitude() method to the vector2 class