Table of Contents

Method RotateAround

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

RotateAround(Vector2, float, Vector2)

Rotates a vector by a given angle around a given point.

public static Vector2 RotateAround(this Vector2 vector, float angleInDeg, Vector2 axisPosition)

Parameters

vector Vector2

The vector to rotate.

angleInDeg float

The angle in degrees.

axisPosition Vector2

The point to rotate around.

Returns

Vector2

The rotated vector.