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

◆ WriteDoubleText()

unsafe override void System.Xml.XmlBinaryNodeWriter.WriteDoubleText ( double d)
inline

Definition at line 802 of file XmlBinaryNodeWriter.cs.

803 {
804 float value;
805 if (d >= -3.4028234663852886E+38 && d <= 3.4028234663852886E+38 && (double)(value = (float)d) == d)
806 {
808 return;
809 }
810 int offset;
812 byte* ptr = (byte*)(&d);
813 textNodeBuffer[offset] = 146;
814 textNodeBuffer[offset + 1] = *ptr;
815 textNodeBuffer[offset + 2] = ptr[1];
816 textNodeBuffer[offset + 3] = ptr[2];
817 textNodeBuffer[offset + 4] = ptr[3];
818 textNodeBuffer[offset + 5] = ptr[4];
819 textNodeBuffer[offset + 6] = ptr[5];
820 textNodeBuffer[offset + 7] = ptr[6];
821 textNodeBuffer[offset + 8] = ptr[7];
822 Advance(9);
823 }
unsafe override void WriteFloatText(float f)
byte[] GetTextNodeBuffer(int size, out int offset)

References System.Xml.XmlStreamNodeWriter.Advance(), System.Xml.Dictionary, System.Xml.E, System.Xml.XmlBinaryNodeWriter.GetTextNodeBuffer(), System.offset, System.value, and System.Xml.XmlBinaryNodeWriter.WriteFloatText().