Skip to content

Commit 0bf1134

Browse files
🔩 Readme Update
- Updated the readme to have more details about the repo.
1 parent 3741e59 commit 0bf1134

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
1-
# Alea-CSharp
2-
A C# version of the Alea pseudo-random number generator (PRNG) origionally created by Johannes Baagøe.
1+
# Alea C#
2+
A simple C# version of the Alea pseudo-random number generator (PRNG) origionally created by Johannes Baagøe.
3+
<br><br>
4+
## Conception
5+
I pretty much made this for a wrok project where I was trying to work out a random number generator to use between systems in C# & Javascript. The results needed to be the same and I came accross Alea. Though there was no C# implementation that I could find, so I made this.
6+
<br><br>
7+
I use this in my Unity code library <a href="https://github.com/CarterGames/The-Cart">here</a> if you want an example intergration.
8+
<br><br>
9+
## How to use
10+
First make an instance of the Alea number generator. Its not static to be the most flexiable as you can enter the seed into the constructor. An example below:
11+
<br>
12+
```
13+
var alea = new Alea("MySeed");
14+
```
15+
<br>
16+
To get a random number just call <code>Alea.Random()</code> from your instance to get a random number from the generator. An example below:
17+
<br><br>
18+
19+
```
20+
var alea = new Alea("MySeed");
21+
var randomNumber = alea.Random();
22+
```
23+
## Licence
24+
<br><br>
25+
MIT Licence

0 commit comments

Comments
 (0)