public static bool AreCollinear(Point2D a, Point2D b) { return Math.Abs(a.MultiplyVector(b).Norm() - 0) < Epsilon; }
public static double Distance(Point2D point, Line2D line) { Point2D vector = point - line.Begin; return(vector.MultiplyVector(line.Direction).Norm() / line.Direction.Norm()); }
public static bool AreCollinear(Point2D a, Point2D b) { return(Math.Abs(a.MultiplyVector(b).Norm() - 0) < Epsilon); }