Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
NFloat.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
using
System.Runtime.CompilerServices
;
3
4
namespace
System.Runtime.InteropServices
;
5
6
[Intrinsic]
7
public
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
}
System.IEquatable
Definition
IEquatable.cs:4
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.Runtime.InteropServices
Definition
SequenceMarshal.cs:4
System.ExceptionArgument.value
@ value
System.ExceptionArgument.other
@ other
System.Runtime.InteropServices.NFloat.Equals
bool Equals(NFloat other)
Definition
NFloat.cs:32
System.Runtime.InteropServices.NFloat._value
readonly double _value
Definition
NFloat.cs:9
System.Runtime.InteropServices.NFloat.Value
double Value
Definition
NFloat.cs:11
System.Runtime.InteropServices.NFloat.NFloat
NFloat(double value)
Definition
NFloat.cs:18
System.Runtime.InteropServices.NFloat.ToString
override string ToString()
Definition
NFloat.cs:42
System.Runtime.InteropServices.NFloat.NFloat
NFloat(float value)
Definition
NFloat.cs:13
System.Runtime.InteropServices.NFloat.Equals
override bool Equals([NotNullWhen(true)] object? o)
Definition
NFloat.cs:23
System.Runtime.InteropServices.NFloat.GetHashCode
override int GetHashCode()
Definition
NFloat.cs:37
System.Runtime.InteropServices.NFloat
Definition
NFloat.cs:8
source
System.Private.CoreLib
System.Runtime.InteropServices
NFloat.cs
Generated by
1.10.0