src/classes/sigma.classes.edgequad.js
function(a, c1, c2) {
      var sc1 = [],
          sc2 = [];

      for (var ci = 0; ci < 4; ci++) {
        var p1 = this.projection(c1[ci], a),
            p2 = this.projection(c2[ci], a);

        sc1.push(p1.x * a.x + p1.y * a.y);
        sc2.push(p2.x * a.x + p2.y * a.y);
      }

      var maxc1 = Math.max.apply(Math, sc1),
          maxc2 = Math.max.apply(Math, sc2),
          minc1 = Math.min.apply(Math, sc1),
          minc2 = Math.min.apply(Math, sc2);

      return (minc2 <= maxc1 && maxc2 >= minc1);
    }
function(a, c1, c2) {
      var sc1 = [],
          sc2 = [];

      for (var ci = 0; ci < 4; ci++) {
        var p1 = this.projection(c1[ci], a),
            p2 = this.projection(c2[ci], a);

        sc1.push(p1.x * a.x + p1.y * a.y);
        sc2.push(p2.x * a.x + p2.y * a.y);
      }

      var maxc1 = Math.max.apply(Math, sc1),
          maxc2 = Math.max.apply(Math, sc2),
          minc1 = Math.min.apply(Math, sc1),
          minc2 = Math.min.apply(Math, sc2);

      return (minc2 <= maxc1 && maxc2 >= minc1);
    }
function ( a , c1 , c2 ) { var sc1 = [ ] , sc2 = [ ] ; for ( var ci = 0 ; ci < 4 ; ci ++ ) { var p1 = this . projection ( c1 [ ci ] , a ) , p2 = this . projection ( c2 [ ci ] , a ) ; sc1 . push ( p1 . x * a . x + p1 . y * a . y ) ; sc2 . push ( p2 . x * a . x + p2 . y * a . y ) ; } var maxc1 = Math . max . apply ( Math , sc1 ) , maxc2 = Math . max . apply ( Math , sc2 ) , minc1 = Math . min . apply ( Math , sc1 ) , minc2 = Math . min . apply ( Math , sc2 ) ; return ( minc2 <= maxc1 && maxc2 >= minc1 ) ; }
Check whether two rectangles collide on one particular axis.

@param  {object}   An axis' coordinates (x, y).
@param  {array}    Rectangle A's corners.
@param  {array}    Rectangle B's corners.
@return {boolean}  True if the rectangles collide on the axis.
Check whether two rectangles collide on one particular axis .