public static final float sinValue(final float s, final float minFreq, final float maxFreq, final float sWidth) {
        float value = 0;
        float cutoff = ShaderUtils.clamp(0.5f / sWidth, 0, maxFreq);
        float f;
        for (f = minFreq; f < 0.5 * cutoff; f *= 2) {
            value += Math.sin(2 * Math.PI * f * s) / f;
        }
        float fade = ShaderUtils.clamp(2 * (cutoff - f) / cutoff, 0, 1);
        value += fade * Math.sin(2 * Math.PI * f * s) / f;
        return value;
    }
A private constructor to inhibit instantiation of this class.
jme3-terrain/src/main/java/com/jme3/terrain/noise/ShaderUtils.java