MinieExamples/src/main/java/jme3utilities/minie/test/common/AbstractDemo.java
/**
     * Advance a float selection by the specified (cyclic) amount.
     *
     * @param valuesArray an array of values in ascending order (not null,
     * unaffected)
     * @param startValue the starting value (found in values[])
     * @param amount the number of values to advance (may be negative)
     * @return the new (advanced) value
     */
Advance a float selection by the specified (cyclic) amount.

@param valuesArray an array of values in ascending order (not null,
unaffected)
@param startValue the starting value (found in values[])
@param amount the number of values to advance (may be negative)
@return the new (advanced) value
Advance a float selection by the specified ( cyclic ) amount . @param valuesArray an array of values in ascending order ( not null unaffected ) @param startValue the starting value ( found in values [] ) @param amount the number of values to advance ( may be negative ) @return the new ( advanced ) value
public static float advanceFloat(float[] valuesArray, float startValue,
            int amount) {
        int index = Arrays.binarySearch(valuesArray, startValue);
        float result;
        if (index < 0) {
            result = valuesArray[0];
        } else {
            assert valuesArray[index] == startValue;
            index = MyMath.modulo(index + amount, valuesArray.length);
            result = valuesArray[index];
        }
        return result;
    }
public static float advanceFloat ( float [ ] valuesArray , float startValue , int amount ) { int index = Arrays . binarySearch ( valuesArray , startValue ) ; float result ; if ( index < 0 ) { result = valuesArray [ 0 ] ; } else { assert valuesArray [ index ] == startValue ; index = MyMath . modulo ( index + amount , valuesArray . length ) ; result = valuesArray [ index ] ; } return result ; }
Advance a float selection by the specified (cyclic) amount.
Advance a float selection by the specified ( cyclic ) amount .