normalize method

double normalize(
  1. double bmin,
  2. double bmax,
  3. double b
)

Implementation

double normalize(double bmin, double bmax, double b) {
  return (b - bmin) / (bmax - bmin);
}