The Normal
property of the Vector2
struct returns a normalized version of the vector, which means it has the same direction but a length of one. This is useful for obtaining the direction of the vector without considering its magnitude.
The Normal
property of the Vector2
struct returns a normalized version of the vector, which means it has the same direction but a length of one. This is useful for obtaining the direction of the vector without considering its magnitude.
To use the Normal
property, simply access it on an instance of Vector2
. It is a read-only property and does not modify the original vector.
Vector2 vector = new Vector2(3, 4); Vector2 normalizedVector = vector.Normal; // normalizedVector is now (0.6, 0.8)