function interpolateNumber(base, value, input1, output1, input2, output2) {
  const delta = input2 - input1;
  if (delta === 0) {
    return output1;
  }
  const along = value - input1;
  const factor =
    base === 1
      ? along / delta
      : (Math.pow(base, along) - 1) / (Math.pow(base, delta) - 1);
  return output1 + factor * (output2 - output1);
}
@param {number} base The base.
@param {number} value The value.
@param {number} input1 The first input value.
@param {number} output1 The first output value.
@param {number} input2 The second input value.
@param {number} output2 The second output value.
@return {number} The interpolated value.