function isOverlapping(a, b) {
    return !(
      a.left + a.width <= b.left ||
      b.left + b.width <= a.left ||
      a.top + a.height <= b.top ||
      b.top + b.height <= a.top
    );
  }
Check if two rectangles are overlapping.

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