code: function interpolate(min, max, ratio) {
    return Math.floor(ratio * ((max + 0.5) - min) + min);
  }
docs: Given float `ratio` in [0, 1], return integer value in [min, max]. interpolate(min, max, 0.0) === min interpolate(min, max, 1.0) === max