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
@@ -221,8 +221,7 @@ public static class ULongExtensions
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ulong Mod6(this ulong value)
|
||||
{
|
||||
ulong key = (value.Mod3() << 1) | (value & 1UL);
|
||||
return Mod6Lookup[(int)key];
|
||||
return Mod6Lookup[(int)(((value.Mod3() << 1) | (value & 1UL)))];
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
@@ -647,4 +646,4 @@ public static class ULongExtensions
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user