コード例 #1
0
 static public Vector2 CreateDirection(float degrees)
 {
     return(new Vector2(TrigDegree.Cos(degrees), TrigDegree.Sin(degrees)));
 }
コード例 #2
0
 static public float GetPerspectiveWorldPerPixel(this Camera item, float distance)
 {
     return((TrigDegree.Sin(item.fieldOfView / 2.0f) * distance * 2.0f) / item.GetPixelHeight());
 }