Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ConvertToRoman()

static void System.Xml.Xsl.Runtime.NumberFormatterBase.ConvertToRoman ( StringBuilder sb,
double val,
bool upperCase )
inlinestaticinherited

Definition at line 28 of file NumberFormatterBase.cs.

29 {
30 int num = (int)val;
31 string value = (upperCase ? "IIVIXXLXCCDCM" : "iivixxlxccdcm");
32 int num2 = s_romanDigitValue.Length;
33 while (num2-- != 0)
34 {
35 while (num >= s_romanDigitValue[num2])
36 {
37 num -= s_romanDigitValue[num2];
38 sb.Append(value, num2, 1 + (num2 & 1));
39 }
40 }
41 }
StringBuilder Append(char value, int repeatCount)

References System.Text.StringBuilder.Append(), System.Xml.Dictionary, System.Xml.Xsl.Runtime.NumberFormatterBase.s_romanDigitValue, and System.value.

Referenced by System.Xml.Xsl.XsltOld.NumberAction.NumberingFormat.FormatItem(), and System.Xml.Xsl.Runtime.NumberFormatter.FormatItem().