Returns a unit version of this vector. Keep in mind this returns a Vector2
and not a Vector2Int
.
Returns a unit version of this vector. Keep in mind this returns a Vector2
and not a Vector2Int
.
Use the Normal
property to obtain a normalized version of a Vector2Int
instance. This is useful when you need the direction of the vector without regard to its magnitude.
Vector2Int vector = new Vector2Int(3, 4); Vector2 normalizedVector = vector.Normal; // normalizedVector is approximately (0.6, 0.8)