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

◆ GetHashCode()

static int System.Decimal.DecCalc.GetHashCode ( in decimal d)
inlinestaticpackage

Definition at line 1543 of file Decimal.cs.

1544 {
1545 if ((d.Low64 | d.High) == 0L)
1546 {
1547 return 0;
1548 }
1549 uint flags = (uint)d._flags;
1550 if ((flags & 0xFF0000) == 0 || (d.Low & (true ? 1u : 0u)) != 0)
1551 {
1552 return (int)(flags ^ d.High ^ d.Mid ^ d.Low);
1553 }
1554 int scale = (byte)(flags >> 16);
1555 uint low = d.Low;
1556 ulong high = ((ulong)d.High << 32) | d.Mid;
1557 Unscale(ref low, ref high, ref scale);
1558 flags = (flags & 0xFF00FFFFu) | (uint)(scale << 16);
1559 return (int)flags ^ (int)(high >> 32) ^ (int)high ^ (int)low;
1560 }
static void Unscale(ref uint low, ref ulong high64, ref int scale)
Definition Decimal.cs:370

References System.Runtime.Serialization.Dictionary, System.L, and System.Decimal.DecCalc.Unscale().

Referenced by System.Decimal.GetHashCode().