Created
January 23, 2012 05:39
-
-
Save posaunehm/1660918 to your computer and use it in GitHub Desktop.
Vector Helper Extention Method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static readonly Vector ANGLE_BASE_VECTOR = new Vector(1, 0); | |
/// <summary> | |
/// ベクトルの角度をDegreeで返します | |
/// </summary> | |
/// <param name="vector">ベクトル</param> | |
/// <returns>角度(Degree値)</returns> | |
public static double GetAngle(this Vector vector) | |
{ | |
return Vector.AngleBetween(ANGLE_BASE_VECTOR, vector); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment