Inline single-use modulo helpers

This commit is contained in:
Marek Lemańczyk committed 2025-09-22 19:54:54 +02:00
1 parent 3598f88aaf
commit 3b8a10a20b
5 files changed
+33 -35

No files matched your search

+1 -2
View File
@@ -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)]