Example #1
0
 public static float DistanceUnites(Objet unite1, Objet unite2)
 {
     return (float)Math.Sqrt(Math.Pow(ConvertUnits.ToDisplayUnits(unite1.body.Position - unite2.body.Position).X, 2) + Math.Pow(ConvertUnits.ToDisplayUnits(unite1.body.Position - unite2.body.Position).Y, 2));
 }
Example #2
0
 public static float DistanceUnites(Objet unite1, Objet unite2)
 {
     return((float)Math.Sqrt(Math.Pow(ConvertUnits.ToDisplayUnits(unite1.body.Position - unite2.body.Position).X, 2) + Math.Pow(ConvertUnits.ToDisplayUnits(unite1.body.Position - unite2.body.Position).Y, 2)));
 }
Example #3
0
 public static float AngleUnites(Objet unite1, Objet unite2)
 {
     return (float)Math.Atan2(unite1.body.Position.Y - unite2.body.Position.Y, unite1.body.Position.X - unite2.body.Position.X);
 }
Example #4
0
 public static float AngleUnites(Objet unite1, Objet unite2)
 {
     return((float)Math.Atan2(unite1.body.Position.Y - unite2.body.Position.Y, unite1.body.Position.X - unite2.body.Position.X));
 }