function testPolygonPolygonSubCase(polygon1, polygon2) {
  let intersects = false;
  for (let i = 0, len = polygon2.edges.length; i < len; i++) {
    intersects = testPolygonLine(polygon1, pointsToLine(polygon2.edges[i]));
    if (intersects === true) {
      return true;
    }
  }
  return false;
}
// Only when the polygon1's bounds is not inside the polygon2's bounds
Only when the polygon1's bounds is not inside the polygon2's bounds
Only when the polygon1 ' s bounds is not inside the polygon2 ' s bounds
function testPolygonPolygonSubCase(polygon1, polygon2) {
  let intersects = false;
  for (let i = 0, len = polygon2.edges.length; i < len; i++) {
    intersects = testPolygonLine(polygon1, pointsToLine(polygon2.edges[i]));
    if (intersects === true) {
      return true;
    }
  }
  return false;
}
function testPolygonPolygonSubCase ( polygon1 , polygon2 ) { let intersects = false ; for ( let i = 0 , len = polygon2 . edges . length ; i < len ; i ++ ) { intersects = testPolygonLine ( polygon1 , pointsToLine ( polygon2 . edges [ i ] ) ) ; if ( intersects === true ) { return true ; } } return false ; }
Only when the polygon1's bounds is not inside the polygon2's bounds
Only when the polygon1 ' s bounds is not inside the polygon2 ' s bounds