1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-12 22:25:40 +00:00

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

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>
{