BaseScale<D, R extends num> constructor

BaseScale<D, R extends num>(
  1. List<D> domain,
  2. List<R> range,
  3. bool inverse
)

当inverse为true时我们将反转domain

Implementation

BaseScale(List<D> domain, this.range, this.inverse) {
  if (inverse) {
    this.domain = List.from(domain.reversed);
  } else {
    this.domain = domain;
  }
}