refactor: CountDigits is Pure. also honour methodimpl

This commit is contained in:
Oliver Booth 2023-08-25 02:50:15 +01:00
parent 39dfea7622
commit b8f85e4270
Signed by: oliverbooth
GPG Key ID: B89D139977693FED
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,8 @@ public static class BinaryIntegerExtensions
/// </summary>
/// <param name="value">The value whose digit count to compute.</param>
/// <returns>The number of digits in <paramref name="value" />.</returns>
[Pure]
[MethodImpl(CompilerResources.MethodImplOptions)]
public static int CountDigits<TNumber>(this TNumber value)
where TNumber : IBinaryInteger<TNumber>
{