示例#1
0
 public double DistanceTo(PlayerLocation other)
 {
     return(Math.Sqrt(Square(other.X - X) +
                      Square(other.Y - Y) +
                      Square(other.Z - Z)));
 }
示例#2
0
 public ChunkCoordinates(PlayerLocation location)
 {
     X = ((int)Math.Floor(location.X)) >> 4;
     Z = ((int)Math.Floor(location.Z)) >> 4;
 }
示例#3
0
 public BlockCoordinates(PlayerLocation location)
 {
     X = (int)Math.Floor(location.X);
     Y = (int)Math.Floor(location.Y);
     Z = (int)Math.Floor(location.Z);
 }