1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-22 14:08:48 +00:00

refactor: rename TNumber as TInteger

This commit is contained in:
Oliver Booth 2023-08-25 02:53:06 +01:00
parent b8f85e4270
commit 2da8c7db7a
Signed by: oliverbooth
GPG Key ID: B89D139977693FED

View File

@ -1,4 +1,4 @@
#if NET7_0_OR_GREATER #if NET7_0_OR_GREATER
using System.Diagnostics.Contracts; using System.Diagnostics.Contracts;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -18,10 +18,10 @@ public static class BinaryIntegerExtensions
/// <returns>The number of digits in <paramref name="value" />.</returns> /// <returns>The number of digits in <paramref name="value" />.</returns>
[Pure] [Pure]
[MethodImpl(CompilerResources.MethodImplOptions)] [MethodImpl(CompilerResources.MethodImplOptions)]
public static int CountDigits<TNumber>(this TNumber value) public static int CountDigits<TInteger>(this TInteger value)
where TNumber : IBinaryInteger<TNumber> where TInteger : IBinaryInteger<TInteger>
{ {
if (TNumber.IsZero(value)) if (TInteger.IsZero(value))
{ {
return 1; return 1;
} }