Esempio n. 1
0
 public readonly CoordB ToByte()
 {
     return(CoordB.From(
                (sbyte)(X / Block.BLOCK_SIZE),
                (sbyte)(Y / Block.BLOCK_SIZE),
                (sbyte)(Z / Block.BLOCK_SIZE)));
 }
Esempio n. 2
0
 public static CoordB Parse(string value, string separator)
 {
     string[] coord = value.Split(separator);
     return(CoordB.From(
                (sbyte)sbyte.Parse(coord[0]),
                (sbyte)sbyte.Parse(coord[1]),
                (sbyte)sbyte.Parse(coord[2])
                ));
 }
Esempio n. 3
0
 public bool Equals(CoordB other)
 {
     return(X == other.X && Y == other.Y && Z == other.Z);
 }
        public static sbyte Distance(CoordB left, CoordB right)
        {
            CoordB displacement = left - right;

            return(displacement.Length());
        }
Esempio n. 5
0
 public bool Equals(CoordB other) => X == other.X && Y == other.Y && Z == other.Z;
Esempio n. 6
0
 public static sbyte Distance(CoordB left, CoordB right) => (left - right).Length();
Esempio n. 7
0
 public readonly CoordB Add(CoordB other)
 {
     return(From((sbyte)(X + other.X), (sbyte)(Y + other.Y), (sbyte)(Z + other.Z)));
 }