code: function distanceSquared(a, b) {
      const diff = {
          x: a.x - b.x,
          y: a.y - b.y,
      };
  
      return dotProduct(diff, diff);
  }
docs: add point to point or number
  @param {Point2D} a
  @param {Point2D} b