public static float saturate(float input) {
        return clamp(input, 0f, 1f);
    }
Clamps the given float to be between 0 and 1.

@param input the value to be clamped
@return input clamped between 0 and 1.
jme3-core/src/main/java/com/jme3/math/FastMath.java