code: private boolean isCrossed(Point2d beg1, Point2d end1, Point2d beg2, Point2d end2) {
          return Line2D.linesIntersect(beg1.x, beg1.y, end1.x, end1.y, beg2.x, beg2.y, end2.x, end2.y);
      }
docs: Check if two bonds are crossing.
  
  @param beg1 first atom of first bond
  @param end1 second atom of first bond
  @param beg2 first atom of second bond
  @param end2 first atom of second bond
  @return bond is crossing