Beispiel #1
0
 static public Vector2 CreateDirection(float degrees)
 {
     return(new Vector2(TrigDegree.Cos(degrees), TrigDegree.Sin(degrees)));
 }
Beispiel #2
0
 static public float GetAngleInDegrees(this Vector2 item)
 {
     return(TrigDegree.Atan2(item.y, item.x));
 }
Beispiel #3
0
 static public float GetPerspectiveWorldPerPixel(this Camera item, float distance)
 {
     return((TrigDegree.Sin(item.fieldOfView / 2.0f) * distance * 2.0f) / item.GetPixelHeight());
 }