protected void checkScales ( ) { if ( getScale ( 0 ) < 0 ) { throw new IllegalArgumentException ( "The first layer must be more than zero." ) ; } double prevScale = 0 ; for ( int i = 0 ; i < getNumLayers ( ) ; i ++ ) { double s = getScale ( i ) ; if ( s < prevScale ) throw new IllegalArgumentException ( "Higher layers must be the same size or larger than previous layers." ) ; prevScale = s ; } }
Used to internally check that the provided scales are valid .