code: function lineSegmentAtPoint(point, lp1, lp2) {
    const dydx = (lp2.y - lp1.y) / (lp2.x - lp1.x);
    const fx = {
      value: lp1.x + dydx * (point.x - lp1.x),
      gradient: dydx,
    };
  
    return fx;
  }
docs: Returns the y value of the line segment at the x value of the point.
  @private
  @method
  @name lineSegmentAtPoint
  
  @param {Object} point The point being queried.
  @param {Object} lp1 The first point of the line segment.
  @param {Object} lp2 The second point of the line segment.
  @returns {Object} An object containing the y value as well as the gradient of the line segment.