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