public static Pos GetPos(this CommandArguments args, int index, Pos defaultPos)
 {
     return new Pos
         {
             X = args.Get(index, defaultPos.X),
             Y = args.Get(index + 1, defaultPos.Y),
             Z = args.Get(index + 2, defaultPos.Z)
         };
 }
Beispiel #2
0
Datei: Pos.cs Projekt: ktj007/mmo
 public static double Distance(Pos from, Pos to)
 {
     return Math.Sqrt(Math.Pow(from.X - to.X, 2) + Math.Pow(from.Y - to.Y, 2) + Math.Pow(from.Z - to.Z, 2));
 }