static boolean isIntersect ( double ax , double ay , double bx , double by , double cx , double cy , double dx , double dy ) {
  double ta = ( cx - dx ) * ( ay - cy ) + ( cy - dy ) * ( cx - ax ) ;
  double tb = ( cx - dx ) * ( by - cy ) + ( cy - dy ) * ( cx - bx ) ;
  double tc = ( ax - bx ) * ( cy - ay ) + ( ay - by ) * ( ax - cx ) ;
  double td = ( ax - bx ) * ( dy - ay ) + ( ay - by ) * ( ax - dx ) ;
  return tc * td < 0 && ta * tb < 0 ;
}

static boolean isIntersect ( double ax , double ay , double bx , double by , double cx , double cy , double dx , double dy ) { double ta = ( cx - dx ) * ( ay - cy ) + ( cy - dy ) * ( cx - ax ) ; double tb = ( cx - dx ) * ( by - cy ) + ( cy - dy ) * ( cx - bx ) ; double tc = ( ax - bx ) * ( cy - ay ) + ( ay - by ) * ( ax - cx ) ; double td = ( ax - bx ) * ( dy - ay ) + ( ay - by ) * ( ax - dx ) ; return tc * td < 0 && ta * tb < 0 ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier))) body: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (return_statement (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))))))