public Line Perpendicular(PointD point) { return new Line(point, this.Slope != null ? -1 / this.Slope : 0); }
public double DistanceTo(Line line) { Line perpendicular = line.Perpendicular(this); PointD intersection = line.IntersectionWith(perpendicular); return DistanceTo(intersection); }