To normalize:
This will ensure that the total length of the vector == 1.Code:magnitude = sqrt(x^2+y^2+z^2); x/=magnitude; y/=magnitude; z/=magnitude;
To normalize:
This will ensure that the total length of the vector == 1.Code:magnitude = sqrt(x^2+y^2+z^2); x/=magnitude; y/=magnitude; z/=magnitude;
Away.