C# Класс Project290.Mathematics.RotationHelper

This static public class is used to convert from a Vector2 to an angle or vice versa.
Показать файл Открыть проект

Открытые методы

Метод Описание
AngleToVector2 ( float angle ) : Vector2

Converts the specified angle into a vector of magnitude 1.

Vector2ToAngle ( float x, float y ) : float

Takes as a paramter a vector and returns the angle in radians corresponding to the vector.

Описание методов

AngleToVector2() публичный статический Метод

Converts the specified angle into a vector of magnitude 1.
public static AngleToVector2 ( float angle ) : Vector2
angle float The angle.
Результат Vector2

Vector2ToAngle() публичный статический Метод

Takes as a paramter a vector and returns the angle in radians corresponding to the vector.
public static Vector2ToAngle ( float x, float y ) : float
x float The x coordinate.
y float The y cooordinate.
Результат float