function addWithCancellationCheck(left, right, tolerance) {
  const difference = left + right;
  if (
    CesiumMath.sign(left) !== CesiumMath.sign(right) &&
    Math.abs(difference / Math.max(Math.abs(left), Math.abs(right))) < tolerance
  ) {
    return 0.0;
  }

  return difference;
}
Computes the intersection points of a ray with an ellipsoid.

@param {Ray} ray The ray.
@param {Ellipsoid} ellipsoid The ellipsoid.
@returns {Interval} The interval containing scalar points along the ray or undefined if there are no intersections.