Vector2Int Perpendicular { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Perpendicular property of the Vector2Int struct returns a new integer vector that is perpendicular to the current vector. This is useful in various mathematical and graphical computations where a perpendicular vector is needed, such as in normal calculations or when determining orthogonal directions.

Usage

To use the Perpendicular property, simply access it from an instance of Vector2Int. It will return a new Vector2Int that is perpendicular to the original vector.

Example

Vector2Int originalVector = new Vector2Int(1, 0);
Vector2Int perpendicularVector = originalVector.Perpendicular;
// perpendicularVector is now (0, 1)