currently unused
num relativeMiddleDistance(num v, num pmin, num pmax) { final num range = pmax - pmin; return 2 * ((pmin + (range) / 2 - v) / (range)).abs(); }