code: public static int rollover(int value, int min, int max) {
  		if (value < min) {
  			int roll = (min - value) % (max - min + 1);
  			return roll != 0 ? max + 1 - roll : min;
  		} else if (value > max) {
  			int roll = (value - max) % (max - min + 1);
  			return roll != 0 ? min - 1 + roll : max;
  		}
  		return value;
  	}
docs: <p>
  Get the value if it is between min and max or a value that is rolled over into min and max.
  </p>
  <pre>{@code
  rollover(4, 5, 10)  // 10
  rollover(3, 5, 10)  // 9
  rollover(11, 5, 10) // 5
  rollover(12, 5, 10) // 6
  }</pre>
  
  @since 2.3.0