code: function rectToPoints (rect) {
    const rectPoints = {
      topLeft: {
        x: rect.left,
        y: rect.top
      },
      bottomRight: {
        x: rect.left + rect.width,
        y: rect.top + rect.height
      }
    };
  
    return rectPoints;
  }
docs: Returns top-left and bottom-right points of the rectangle