
com.github.chaosfirebolt.converter.util.MaxCalculator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of roman-numeral-converter Show documentation
Show all versions of roman-numeral-converter Show documentation
Library for converting roman numerals to arabic and vice versa.
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