C# Class Universe.Framework.Utilities.PrimeNumberHelper

Utility class that is used to find small prime numbers and test is number prime number.
Exibir arquivo Open project: Virtual-Universe/Virtual-Universe

Public Methods

Method Description
GetPrime ( int min ) : int

Get prime number that is equal or larger than min.

IsPrime ( int candinate ) : bool

Just basic Sieve of Eratosthenes prime number test.

Method Details

GetPrime() public static method

Get prime number that is equal or larger than min.
public static GetPrime ( int min ) : int
min int /// Minimal returned prime number. ///
return int

IsPrime() public static method

Just basic Sieve of Eratosthenes prime number test.
public static IsPrime ( int candinate ) : bool
candinate int /// Number that is tested. ///
return bool