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); }
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); }
public double DistanceBetween(Point2DFloat xy) { return(Math.Sqrt(Math.Pow(this.X - xy.X, 2) + Math.Pow(this.Y - xy.Y, 2))); }