compute(val) {
    const { domain: d, range: r } = this
    return ((val - d[0]) / (d[1] - d[0])) * (r[1] - r[0]) + r[0]
  }