Inline single-use modulo helpers
This commit is contained in:
1 parent
3598f88aaf
commit
3b8a10a20b
5 files changed
+33
-35
No files matched your search
@@ -23,8 +23,7 @@ public static class UIntExtensions
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static uint Mod6(this uint value)
|
||||
{
|
||||
uint key = (value.Mod3() << 1) | (value & 1U);
|
||||
return Mod6Lookup[(int)key];
|
||||
return Mod6Lookup[(int)(((value.Mod3() << 1) | (value & 1U)))];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
Reference in new issue
Block a user