count method

num count(
  1. num value,
  2. List<ConversionNode<T>> path
)

Implementation

num count(num value, List<ConversionNode<T>> path) {
  num result = value;
  for (int i = 0; i < path.length - 1; i++) {
    result = (result - path[i].coefficientSum) *
            path[i + 1].coefficientProduct /
            path[i].coefficientProduct +
        path[i + 1].coefficientSum;
  }
  return result;
}