function smoothstep( x, min, max ) {

	if ( x <= min ) return 0;
	if ( x >= max ) return 1;

	x = ( x - min ) / ( max - min );

	return x * x * ( 3 - 2 * x );

}
Returns a value in the range `[0,1]` that represents the percentage that `x` has
moved between `min` and `max`, but smoothed or slowed down the closer `x` is to
the `min` and `max`.

See [Smoothstep]{@link http://en.wikipedia.org/wiki/Smoothstep} for more details.

@param {number} x - The value to evaluate based on its position between min and max.
@param {number} min - The min value. Any x value below min will be `0`.
@param {number} max - The max value. Any x value above max will be `1`.
@return {number} The alternated value.