Table of Contents

Method Perp

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

Perp(Vector2)

Returns the vector rotated 90 degrees counter-clockwise.

public static Vector2 Perp(this Vector2 vector)

Parameters

vector Vector2

Returns

Vector2

Remarks

The returned vector is always perpendicular to the given vector.

The perp dot product can be calculated using this: var perpDotProduct = Vector2.Dot(v1.Perp(), v2);