private bool IsPointInRange(Point p, float range) { int n = this.points.Count - 1; float t = 0; float h = 1 / this.resolution; RawVector2 P0 = new RawVector2(); for (int i = 0; i <= n; i++) { P0 = MathHelper.ApproximateNext(P0, t, n, i); } while (t < 1) { if (Math.Abs(p.X - P0.X) <= range && Math.Abs(p.Y - P0.Y) <= range) { return(true); } t += h; for (int i = 0; i <= n; i++) { P0 = MathHelper.ApproximateNext(P0, t, n, i); } } return(false); }