diff -r 930a2d3ecaed -r e3a2a5b26abb include/vector.h --- a/include/vector.h Thu Apr 24 13:55:11 2008 +0200 +++ b/include/vector.h Thu Apr 24 18:12:32 2008 +0200 @@ -71,10 +71,10 @@ }; // get normalized copy - Vector3 unit() const + friend Vector3 normalize(Vector3 &v) { - Vector3 u(*this); - return u.normalize(); + const Float f = 1.0f / v.mag(); + return v * f; }; // square magnitude, magnitude