Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NFloat.cs
Go to the documentation of this file.
3
5
6[Intrinsic]
7public readonly struct NFloat : IEquatable<NFloat>
8{
9 private readonly double _value;
10
11 public double Value => _value;
12
13 public NFloat(float value)
14 {
15 _value = value;
16 }
17
18 public NFloat(double value)
19 {
20 _value = value;
21 }
22
23 public override bool Equals([NotNullWhen(true)] object? o)
24 {
25 if (o is NFloat other)
26 {
27 return Equals(other);
28 }
29 return false;
30 }
31
32 public bool Equals(NFloat other)
33 {
34 return _value.Equals(other._value);
35 }
36
37 public override int GetHashCode()
38 {
39 return _value.GetHashCode();
40 }
41
42 public override string ToString()
43 {
44 return _value.ToString();
45 }
46}
override bool Equals([NotNullWhen(true)] object? o)
Definition NFloat.cs:23