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

            return(vector.MultiplyVector(line.Direction).Norm() / line.Direction.Norm());
        }
Beispiel #3
0
 public static bool AreCollinear(Point2D a, Point2D b)
 {
     return(Math.Abs(a.MultiplyVector(b).Norm() - 0) < Epsilon);
 }