private static double GetLinesDistance(Line line, Point point) { return Math.Sqrt(Math.Pow(line.CentrePoint.X - point.X, 2) + Math.Pow(line.CentrePoint.Y - point.Y, 2)); }
private static Point GetOtherPoint(Line line, Point point) { return line.Point1 == point ? line.Point2 : line.Point1; }