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

◆ ToDouble() [6/6]

static double System.Xml.Xsl.Runtime.XsltConvert.ToDouble ( XPathItem item)
inlinestatic

Definition at line 107 of file XsltConvert.cs.

108 {
109 if (item.IsNode)
110 {
111 return XPathConvert.StringToDouble(item.Value);
112 }
113 Type valueType = item.ValueType;
114 if (valueType == StringType)
115 {
116 return XPathConvert.StringToDouble(item.Value);
117 }
118 if (valueType == DoubleType)
119 {
120 return item.ValueAsDouble;
121 }
122 if (!item.ValueAsBoolean)
123 {
124 return 0.0;
125 }
126 return 1.0;
127 }
static readonly Type StringType
static readonly Type DoubleType

References System.Xml.Xsl.Runtime.XsltConvert.DoubleType, System.item, System.Xml.Xsl.XPathConvert.StringToDouble(), and System.Xml.Xsl.Runtime.XsltConvert.StringType.