Skip to content

Instantly share code, notes, and snippets.

@GoombaProgrammer
Created August 18, 2024 08:02
Show Gist options
  • Save GoombaProgrammer/469cc539327eda355571c2613daef17e to your computer and use it in GitHub Desktop.
Save GoombaProgrammer/469cc539327eda355571c2613daef17e to your computer and use it in GitHub Desktop.
c# random number gen
namespace librand
{
public class librand
{
public static int rand(int min, int max)
{
Random r = new Random();
for (int i = min; i < max; i++)
{
if (r.Next(0, 2) == 1)
{
return i;
}
}
return max;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment