Esempio n. 1
0
 public float getAngle()
 {
     if (this.angle.X == 0)
     {
         if (this.angle.Y > 0)
         {
             return(Math2.QUARTER_CIRCLE);
         }
         else
         {
             return(Math2.THREE_QUARTER_CIRCLE);
         }
     }
     return((float)Math.Sin(this.angle.Y / Math2.getQuadSum(this.angle.X, this.angle.Y)));
 }
Esempio n. 2
0
 public static bool inRadius(Vector2 pos1, Vector2 pos2, float radius)
 {
     return(((float)Math2.getQuadSum(pos2.X - pos1.X, pos2.Y - pos1.Y)) < radius);
 }