Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ CompareTo() [1/4]

int System.Single.CompareTo ( float value)
inline

Definition at line 183 of file Single.cs.

184 {
185 if (this < value)
186 {
187 return -1;
188 }
189 if (this > value)
190 {
191 return 1;
192 }
193 if (this == value)
194 {
195 return 0;
196 }
197 if (IsNaN(this))
198 {
199 if (!IsNaN(value))
200 {
201 return -1;
202 }
203 return 0;
204 }
205 return 1;
206 }
static bool IsNaN(float f)
Definition Single.cs:90

References System.Single.IsNaN(), and System.value.