MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / toRoman

Method toRoman

src/main/java/com/volmit/adapt/util/Form.java:1250–1262  ·  view source on GitHub ↗

Get roman numeral representation of the int @param num the int @return the numerals

(int num)

Source from the content-addressed store, hash-verified

1248 * @return the numerals
1249 */
1250 public static String toRoman(int num) {
1251
1252 String res = "";
1253
1254 for (Map.Entry<String, Integer> entry : roman_numerals.entrySet()) {
1255 int matches = num / entry.getValue();
1256
1257 res += repeat(entry.getKey(), matches);
1258 num = num % entry.getValue();
1259 }
1260
1261 return res;
1262 }
1263
1264 /**
1265 * Get the number representation from roman numerals.

Callers 3

applyLoreMethod · 0.95
seeEnchantMethod · 0.95
seePotionEffectMethod · 0.95

Calls 3

repeatMethod · 0.95
getValueMethod · 0.65
getKeyMethod · 0.65

Tested by

no test coverage detected