Table of Contents

Class Vector2Extensions

Namespace
Fantas
Assembly
Fantas.dll

Vector2 extension methods

public static class Vector2Extensions
Inheritance
Vector2Extensions
Inherited Members

Methods

FromRotation(double, float)

Create a Vector given a rotation and lenght

public static Vector2 FromRotation(double angle, float length)

Parameters

angle double
length float

Returns

Vector2

Perpendicular(Vector2)

Get the perpendicular vector

public static Vector2 Perpendicular(this Vector2 vector)

Parameters

vector Vector2

Returns

Vector2

Rotate(Vector2, double)

Rotate vector to an angle

public static Vector2 Rotate(this Vector2 vector, double angle)

Parameters

vector Vector2
angle double

New rotation angle of vector

Returns

Vector2

new vector with the new angle

RotateAround(Vector2, Vector2, double)

Rotate around an origin point

public static Vector2 RotateAround(this Vector2 vector, Vector2 origin, double angle)

Parameters

vector Vector2
origin Vector2
angle double

Returns

Vector2

RotateTo(Vector2, double)

Rotate vector by an angle

public static Vector2 RotateTo(this Vector2 vector, double angle)

Parameters

vector Vector2
angle double

Angle radians to rotate

Returns

Vector2

Rotation(Vector2)

Get the Vector in radians

public static double Rotation(this Vector2 vector)

Parameters

vector Vector2

Returns

double

ToPointF(Vector2)

Convert Vector to PointF

public static PointF ToPointF(this Vector2 vector)

Parameters

vector Vector2

Returns

PointF