test_class.file: kendzi-math-geometry/src/test/java/kendzi/math/geometry/ray/RayUtilTest.java
test_class.identifier: RayUtilTest
test_case.body: @Test
      public void testIsPointOnRay_2() {
  
          Point2d point = new Point2d(-2.1, 2.0);
          Ray2d ray = new Ray2d(new Point2d(-1.0, 1.0), new Vector2d(-1.0, 1.0));
  
          assertFalse(RayUtil.isPointOnRay(point, ray, 0.0000001));
      }
test_case.class_method_signature: RayUtilTest.testIsPointOnRay_2()
test_case.full_signature: @Test public void testIsPointOnRay_2()
test_case.identifier: testIsPointOnRay_2
test_case.invocations: assertFalse isPointOnRay
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIsPointOnRay_2()
focal_class.declarator: SMALL_NUM = 0.00000001
focal_class.modifier: static final
focal_class.original_string: static final double SMALL_NUM = 0.00000001;
focal_class.type: double
focal_class.var_name: SMALL_NUM
focal_class.declarator: EMPTY = new IntersectPoints()
focal_class.modifier: static final
focal_class.original_string: static final IntersectPoints EMPTY = new IntersectPoints();
focal_class.type: IntersectPoints
focal_class.var_name: EMPTY
focal_class.file: kendzi-math-geometry/src/main/java/kendzi/math/geometry/ray/RayUtil.java
focal_class.identifier: RayUtil
focal_class.class_method_signature: RayUtil.RayUtil()
focal_class.full_signature: private  RayUtil()
focal_class.identifier: RayUtil
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  RayUtil()
focal_class.class_method_signature: RayUtil.isPointOnRay(Point2d point, Ray2d ray, double epsilon)
focal_class.full_signature: public static boolean isPointOnRay(Point2d point, Ray2d ray, double epsilon)
focal_class.identifier: isPointOnRay
focal_class.modifiers: public static
focal_class.parameters: (Point2d point, Ray2d ray, double epsilon)
focal_class.return: boolean
focal_class.signature: boolean isPointOnRay(Point2d point, Ray2d ray, double epsilon)
focal_class.class_method_signature: RayUtil.intersectRays2d(Ray2d r1, Ray2d r2)
focal_class.full_signature: public static IntersectPoints intersectRays2d(Ray2d r1, Ray2d r2)
focal_class.identifier: intersectRays2d
focal_class.modifiers: public static
focal_class.parameters: (Ray2d r1, Ray2d r2)
focal_class.return: IntersectPoints
focal_class.signature: IntersectPoints intersectRays2d(Ray2d r1, Ray2d r2)
focal_class.class_method_signature: RayUtil.inCollinearRay(Point2d p, Point2d rayStart, Vector2d rayDirection)
focal_class.full_signature: private static boolean inCollinearRay(Point2d p, Point2d rayStart, Vector2d rayDirection)
focal_class.identifier: inCollinearRay
focal_class.modifiers: private static
focal_class.parameters: (Point2d p, Point2d rayStart, Vector2d rayDirection)
focal_class.return: boolean
focal_class.signature: boolean inCollinearRay(Point2d p, Point2d rayStart, Vector2d rayDirection)
focal_class.class_method_signature: RayUtil.inSegment(Point2d P, Point2d segmentP0, Point2d segmentP1)
focal_class.full_signature: static boolean inSegment(Point2d P, Point2d segmentP0, Point2d segmentP1)
focal_class.identifier: inSegment
focal_class.modifiers: static
focal_class.parameters: (Point2d P, Point2d segmentP0, Point2d segmentP1)
focal_class.return: boolean
focal_class.signature: boolean inSegment(Point2d P, Point2d segmentP0, Point2d segmentP1)
focal_class.class_method_signature: RayUtil.dot(Vector2d u, Vector2d v)
focal_class.full_signature: private static double dot(Vector2d u, Vector2d v)
focal_class.identifier: dot
focal_class.modifiers: private static
focal_class.parameters: (Vector2d u, Vector2d v)
focal_class.return: double
focal_class.signature: double dot(Vector2d u, Vector2d v)
focal_class.class_method_signature: RayUtil.perp(Vector2d u, Vector2d v)
focal_class.full_signature: private static double perp(Vector2d u, Vector2d v)
focal_class.identifier: perp
focal_class.modifiers: private static
focal_class.parameters: (Vector2d u, Vector2d v)
focal_class.return: double
focal_class.signature: double perp(Vector2d u, Vector2d v)
focal_method.body: public static boolean isPointOnRay(Point2d point, Ray2d ray, double epsilon) {
  
          Vector2d rayDirection = new Vector2d(ray.U);
          rayDirection.normalize();
          // test if point is on ray
          Vector2d pointVector = new Vector2d(point);
          pointVector.sub(ray.A);
  
          double dot = rayDirection.dot(pointVector);
  
          if (dot < epsilon) {
              return false;
          }
          double x = rayDirection.x;
          rayDirection.x = rayDirection.y;
          rayDirection.y = -x;
  
          dot = rayDirection.dot(pointVector);
  
          return -epsilon < dot && dot < epsilon;
      }
focal_method.class_method_signature: RayUtil.isPointOnRay(Point2d point, Ray2d ray, double epsilon)
focal_method.full_signature: public static boolean isPointOnRay(Point2d point, Ray2d ray, double epsilon)
focal_method.identifier: isPointOnRay
focal_method.invocations: normalize sub dot dot
focal_method.modifiers: public static
focal_method.parameters: (Point2d point, Ray2d ray, double epsilon)
focal_method.return: boolean
focal_method.signature: boolean isPointOnRay(Point2d point, Ray2d ray, double epsilon)