mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-22 13:48:47 +00:00
refactor: CountDigits is Pure. also honour methodimpl
This commit is contained in:
parent
39dfea7622
commit
b8f85e4270
@ -16,6 +16,8 @@ public static class BinaryIntegerExtensions
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value">The value whose digit count to compute.</param>
|
/// <param name="value">The value whose digit count to compute.</param>
|
||||||
/// <returns>The number of digits in <paramref name="value" />.</returns>
|
/// <returns>The number of digits in <paramref name="value" />.</returns>
|
||||||
|
[Pure]
|
||||||
|
[MethodImpl(CompilerResources.MethodImplOptions)]
|
||||||
public static int CountDigits<TNumber>(this TNumber value)
|
public static int CountDigits<TNumber>(this TNumber value)
|
||||||
where TNumber : IBinaryInteger<TNumber>
|
where TNumber : IBinaryInteger<TNumber>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user