Example #1
0
        public bool WithinN(Point2DFloat xy, float nWithin)
        {
            bool bWithinX = Math.Abs(xy.X - X) <= nWithin;
            bool bWithinY = Math.Abs(xy.Y - Y) <= nWithin;

            return(bWithinX && bWithinY);
        }
Example #2
0
        public bool Equals(Point2DFloat other)
        {
            if (other == null)
            {
                return(false);
            }
            if (Math.Abs(X - other.X) > 0.0000001f)
            {
                return(false);
            }

            return(Math.Abs(Y - other.Y) < 0.0000001f);
        }
Example #3
0
 public double DistanceBetween(Point2DFloat xy)
 {
     return(Math.Sqrt(Math.Pow(this.X - xy.X, 2) + Math.Pow(this.Y - xy.Y, 2)));
 }