public int increase ( double extrp , int increase ) { final int current = getCurrent ( ) ; final double increased = current + increase * extrp ; set ( increased ) ; if ( increased > max ) { return max - current ; } return increase ; }
Increase current value . The current value will not exceed the maximum .