public bool Contains(Point2L point) { if (point.X > System.Math.Max(this.start.X, this.end.X) || point.X < System.Math.Min(this.start.X, this.end.X) || (point.Y > System.Math.Max(this.start.Y, this.end.Y) || point.Y < System.Math.Min(this.start.Y, this.end.Y))) { return(false); } if (this.start == this.end) { return(true); } Vector2L delta = this.GetDelta(); Vector2L u = point - this.start; Vector2L v = new Vector2L(-delta.Y, delta.X); if (Vector2L.DotProduct(u, v) != 0L) { return(false); } long num = Vector2L.DotProduct(u, delta); if (num < 0L) { return(false); } long lengthSquared = delta.GetLengthSquared(); return(num <= lengthSquared); }
public bool method_1(Point2L point) { long num = Vector2L.DotProduct(point - this.point2L_0, this.vector2L_0); if (num >= 0L) { return(num <= this.long_0); } return(false); }
public LongRational?GetNormalizedProjection(Point2L point) { if (this.start == this.end) { return(new LongRational?()); } Vector2L delta = this.GetDelta(); return(new LongRational?(new LongRational(Vector2L.DotProduct(point - this.start, delta), delta.GetLengthSquared()))); }
public bool ContainsProjection(Point2L point) { Vector2L delta = this.GetDelta(); long num = Vector2L.DotProduct(point - this.start, delta); if (num < 0L) { return(false); } long lengthSquared = delta.GetLengthSquared(); return(num * num <= lengthSquared); }
public bool method_0(Point2L p) { return(Vector2L.DotProduct(p - this.point2L_0, new Vector2L(-this.vector2L_0.Y, this.vector2L_0.X)) == 0L); }