code: public static float smoothStep(float a, float b, float x) {
  		if (x < a)
  			return 0;
  		if (x >= b)
  			return 1;
  		x = (x - a) / (b - a);
  		return x*x * (3 - 2*x);
  	}
docs: A smoothed step function. A cubic function is used to smooth the step between two thresholds.
  @param a the lower threshold position
  @param b the upper threshold position
  @param x the input parameter
  @return the output value