All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.chaosfirebolt.converter.util.MaxCalculator Maven / Gradle / Ivy

There is a newer version: 3.7.0
Show newest version
package com.github.chaosfirebolt.converter.util;

class MaxCalculator {

  static int calculateMax(int maxRegisteredValue) {
    int currentHigh = maxRegisteredValue;
    int max = currentHigh * 3;
    while (currentHigh > 1) {
      int previousOrder = currentHigh / 10;
      max += (currentHigh - previousOrder);
      currentHigh = previousOrder;
    }
    return max;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy