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