Returns the magnitude (Euclidean length) of a Vector.
assert(Vec2(0, 0).magnitude() == 0); assert(Vec2(1, 0).magnitude() == 1); assert(Vec2(0, 1).magnitude() == 1); assert(Vec2(1, 1).magnitude() == sqrt(2f)); assert(Vec2(2, 0).magnitude() == 2);
See Implementation
Returns the magnitude (Euclidean length) of a Vector.