< Summary

Information
Class: ArturRios.Extensions.IntExtensions
Assembly: ArturRios.Extensions
File(s): /home/ci/agent/workspace/dotnet-extensions-docs_main/app/src/IntExtensions.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 65
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 8
Fully covered methods: 8
Total methods: 8
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
IsPrime(...)100%11100%
IsPrime(...)100%11100%
IsPrime(...)100%11100%
IsPrime(...)100%11100%
IsPrime(...)100%11100%
IsPrime(...)100%11100%
IsPrime(...)100%11100%
IsPrime(...)100%11100%

File(s)

/home/ci/agent/workspace/dotnet-extensions-docs_main/app/src/IntExtensions.cs

#LineLine coverage
 1using ArturRios.Util.Math;
 2
 3namespace ArturRios.Extensions;
 4
 5/// <summary>
 6/// Provides extension methods for integer types.
 7/// </summary>
 8public static class IntExtensions
 9{
 10    /// <summary>
 11    /// Determines whether the specified number is a prime number.
 12    /// </summary>
 13    /// <param name="number">The number to check.</param>
 14    /// <returns>true if the number is prime; otherwise, false.</returns>
 1815    public static bool IsPrime(this int number) => PrimeUtils.IsPrimeNumber(number);
 16
 17    /// <summary>
 18    /// Determines whether the specified number is a prime number.
 19    /// </summary>
 20    /// <param name="number">The number to check.</param>
 21    /// <returns>true if the number is prime; otherwise, false.</returns>
 1022    public static bool IsPrime(this long number) => PrimeUtils.IsPrimeNumber(number);
 23
 24    /// <summary>
 25    /// Determines whether the specified number is a prime number.
 26    /// </summary>
 27    /// <param name="number">The number to check.</param>
 28    /// <returns>true if the number is prime; otherwise, false.</returns>
 629    public static bool IsPrime(this short number) => PrimeUtils.IsPrimeNumber(number);
 30
 31    /// <summary>
 32    /// Determines whether the specified number is a prime number.
 33    /// </summary>
 34    /// <param name="number">The number to check.</param>
 35    /// <returns>true if the number is prime; otherwise, false.</returns>
 636    public static bool IsPrime(this byte number) => PrimeUtils.IsPrimeNumber(number);
 37
 38    /// <summary>
 39    /// Determines whether the specified number is a prime number.
 40    /// </summary>
 41    /// <param name="number">The number to check.</param>
 42    /// <returns>true if the number is prime; otherwise, false.</returns>
 443    public static bool IsPrime(this uint number) => PrimeUtils.IsPrimeNumber(number);
 44
 45    /// <summary>
 46    /// Determines whether the specified number is a prime number.
 47    /// </summary>
 48    /// <param name="number">The number to check.</param>
 49    /// <returns>true if the number is prime; otherwise, false.</returns>
 450    public static bool IsPrime(this ulong number) => PrimeUtils.IsPrimeNumber(number);
 51
 52    /// <summary>
 53    /// Determines whether the specified number is a prime number.
 54    /// </summary>
 55    /// <param name="number">The number to check.</param>
 56    /// <returns>true if the number is prime; otherwise, false.</returns>
 457    public static bool IsPrime(this ushort number) => PrimeUtils.IsPrimeNumber(number);
 58
 59    /// <summary>
 60    /// Determines whether the specified number is a prime number.
 61    /// </summary>
 62    /// <param name="number">The number to check.</param>
 63    /// <returns>true if the number is prime; otherwise, false.</returns>
 464    public static bool IsPrime(this sbyte number) => PrimeUtils.IsPrimeNumber(number);
 65}