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

◆ TrimTrailingZeros()

void System.Xml.BinXmlSqlDecimal.TrimTrailingZeros ( )
inlineprivate

Definition at line 103 of file BinXmlSqlDecimal.cs.

104 {
105 uint[] array = new uint[4] { m_data1, m_data2, m_data3, m_data4 };
106 int ciulU = m_bLen;
107 if (ciulU == 1 && array[0] == 0)
108 {
109 m_bScale = 0;
110 return;
111 }
112 while (m_bScale > 0 && (ciulU > 1 || array[0] != 0))
113 {
115 if (iulR != 0)
116 {
117 break;
118 }
119 m_data1 = array[0];
120 m_data2 = array[1];
121 m_data3 = array[2];
122 m_data4 = array[3];
123 m_bScale--;
124 }
125 if (m_bLen == 4 && m_data4 == 0)
126 {
127 m_bLen = 3;
128 }
129 if (m_bLen == 3 && m_data3 == 0)
130 {
131 m_bLen = 2;
132 }
133 if (m_bLen == 2 && m_data2 == 0)
134 {
135 m_bLen = 1;
136 }
137 }
static void MpDiv1(uint[] rgulU, ref int ciulU, uint iulD, out uint iulR)

References System.array, System.Xml.Dictionary, System.Xml.BinXmlSqlDecimal.m_bLen, System.Xml.BinXmlSqlDecimal.m_bScale, System.Xml.BinXmlSqlDecimal.m_data1, System.Xml.BinXmlSqlDecimal.m_data2, System.Xml.BinXmlSqlDecimal.m_data3, System.Xml.BinXmlSqlDecimal.m_data4, and System.Xml.BinXmlSqlDecimal.MpDiv1().

Referenced by System.Xml.BinXmlSqlDecimal.BinXmlSqlDecimal().