Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
HashHelpers.cs
Go to the documentation of this file.
1
using
System.Runtime.CompilerServices
;
2
3
namespace
System.Collections
;
4
5
internal
static
class
HashHelpers
6
{
7
public
static
ulong
GetFastModMultiplier
(uint divisor)
8
{
9
return
ulong.MaxValue / (ulong)divisor + 1;
10
}
11
12
[MethodImpl(
MethodImplOptions
.AggressiveInlining)]
13
public
static
uint
FastMod
(uint
value
, uint divisor, ulong multiplier)
14
{
15
return
(uint)(((multiplier *
value
>> 32) + 1) * divisor >> 32);
16
}
17
}
System.Collections.HashHelpers.FastMod
static uint FastMod(uint value, uint divisor, ulong multiplier)
Definition
HashHelpers.cs:13
System.Collections.HashHelpers.GetFastModMultiplier
static ulong GetFastModMultiplier(uint divisor)
Definition
HashHelpers.cs:7
System.Collections.HashHelpers
Definition
HashHelpers.cs:6
System.Collections
Definition
BlockingCollection.cs:8
System.Runtime.CompilerServices.MethodImplOptions
MethodImplOptions
Definition
MethodImplOptions.cs:5
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.ExceptionArgument.value
@ value
source
System.Collections.Concurrent
System.Collections
HashHelpers.cs
Generated by
1.10.0