This project is read-only.


vector3 normalize not always correct.


Sometimes the normalize function does not work properly.
I get this error when normalizing a Vector3(0.13243,0,0) (or something.)
I then get a normalized vector of Vector3(0.999999,0,0)...
Closed Jan 26, 2011 at 10:29 PM by vetuomia


vetuomia wrote Jan 26, 2011 at 10:24 PM

This is normal and expected behavior. The error is caused by the finite precision of the floating point numbers, producing a vector with length very close to 1.0 but not exactly. In practice, this rarely matters.

For more information, see [url:] and [url:].

wrote Jan 26, 2011 at 10:29 PM

wrote Jan 26, 2011 at 10:29 PM

wrote Feb 14, 2013 at 9:27 PM

wrote May 16, 2013 at 11:19 AM