Vector2 Perpendicular { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

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

Usage

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

Example

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