function getIntersectionArea(a, b) {
    if (!isOverlapping(a, b)) return 0;
    var width = Math.min(a.left + a.width, b.left + b.width) - Math.max(a.left, b.left);
    var height = Math.min(a.top + a.height, b.top + b.height) - Math.max(a.top, b.top);
    return width * height;
  }
Calculate intersection area between two rectangle.

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