function getIntersectionScore(a, b) {
    var area = getIntersectionArea(a, b);
    if (!area) return 0;
    var maxArea = Math.min(a.width, b.width) * Math.min(a.height, b.height);
    return (area / maxArea) * 100;
  }
Calculate how many percent the intersection area of two rectangles is from
the maximum potential intersection area between the rectangles.

@param {Object} a
@param {Object} b
@returns {Number}