relativeMiddleDistance function

num relativeMiddleDistance(
  1. num v,
  2. num pmin,
  3. num pmax
)

currently unused

Implementation

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