Skip to content
Snippets Groups Projects
Commit 2f3333a4 authored by Seilenthal's avatar Seilenthal
Browse files

Random Gnerator V1.1

parent c77f8329
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ namespace PseudoRandomGenerator
/// <summary>
/// Initializes the LCG with a specified seed to start sequence
/// </summary>
/// <param name="seed">Initial value for generating the sequence (e.g., DataTime.Now.Ticks)</param>
/// <param name="seed">Initial value for generating the sequence (e.g., DateTime.Now.Ticks)</param>
public LCG(long seed)
{
this.seed = seed;
......@@ -39,7 +39,7 @@ namespace PseudoRandomGenerator
/// <param name="min">The inclusive lower bound of the random number</param>
/// <param name="max">The exclusive upper bound of the random number</param>
/// <returns>A pseudo-random integer between min and max</returns>
public long Next(int min, int max)
public int Next(int min, int max)
{
// Map the result of Next() to the specified range
return (int)(Next() % (max - min)) + min;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment