- Home /
What is the difference between Normalize & Normalized
Could someone explain to me what is the difference between Normalize and Normalized?
Answer by Bunny83 · Jul 24, 2020 at 01:06 PM
Well there are 3 different things to get a normalized version of a vector3. Not all are currently documented. First there's the static "Normalize" method.
public static Vector3 Normalize(Vector3 aVector)
Since it's a static method it's not a member method of a Vector3 instance but part of the class itself. So it has to be called like this:
normalizedVector = Vector3.Normalize( originalVector );
Next there's the member method Normalize(). This is an instance method. So it does not take any parameters but simply normalizes this instance.
public void Normalize()
Keep in mind that Vector3 is a value type. So using mutating member functions only work on actual Vector3 variables and not on properties.
Vector3 vec = originalVector; // local copy
vec.Normalize(); // vec is now normalized
Finally there's the normalized property of the Vector3 struct. This simply returns a normalized copy of the vector.
normalizedVector = originalVector.normalized;
So there's no difference in what they do, just in the way how you can use them.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Vector normalization question 6 Answers
Normalizing vector doesn't give a constant direction. 2 Answers
Vector3.Normalize not working for particular input? 2 Answers
force.normalized * magnitude 1 Answer