Exemplo n.º 1
0
 public override void Load(System.IO.BinaryReader br, bool loadByteArray)
 {
     base.Load(br, loadByteArray);
     LayerCode  = br.ReadByte();
     Coordinate = new NCZCoordinate(br, true);
     byte[] temp = br.ReadBytes(55);
     Name = Encoding.ASCII.GetString(br.ReadBytes(21)).Replace("\0", "");
 }
 public bool Equals(NCZCoordinate otherCoordinate, int precision)
 {
     if (Math.Round(X, precision) == Math.Round(otherCoordinate.X, precision) && Math.Round(Y, precision) == Math.Round(otherCoordinate.Y, precision))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
        /// <summary>
        /// Sadece X ve Y Koordinatlarına bakılmaktadır....
        /// </summary>
        /// <param name="otherCoordinate"></param>
        /// <param name="tolerance"></param>
        /// <returns></returns>
        public bool Equals(NCZCoordinate otherCoordinate, double tolerance)
        {
            double deltaX = Math.Abs(X - otherCoordinate.X);
            double deltaY = Math.Abs(Y - otherCoordinate.Y);

            if (deltaX < tolerance && deltaY < tolerance)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }