Vector2 Normal { get; set; }

robot_2Generated
code_blocksInput

Description

Returns a unit version of this vector. Keep in mind this returns a Vector2 and not a Vector2Int.

Usage

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.

Example

Vector2Int vector = new Vector2Int(3, 4);
Vector2 normalizedVector = vector.Normal;
// normalizedVector is approximately (0.6, 0.8)