C# Class Project290.Mathematics.RotationHelper

This static public class is used to convert from a Vector2 to an angle or vice versa.
Afficher le fichier Open project: scastle/Solitude

Méthodes publiques

Méthode Description
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.

Method Details

AngleToVector2() public static méthode

Converts the specified angle into a vector of magnitude 1.
public static AngleToVector2 ( float angle ) : Vector2
angle float The angle.
Résultat Vector2

Vector2ToAngle() public static méthode

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.
Résultat float