~/devlog/ciacco-prng

CiaccoPRNG

2015/12/06 22:44

Check the code on GitHub

A simple PRNG algorithm implemented in various languages! Same seed same sequences, ints only.

Usage

PHP:

require_once "ciacco_twister.php";
use ciacco_twisterCiaccoRandom;
$seed = 123;
$min = 0;
$max = 255;
CiaccoRandom::seed($seed);
CiaccoRandom::getRand($min,$max); // returns a pseudo-random int

C#:

int seed = 123;
int min = 0;
int max = 255;
CiaccoRandom randomer = new CiaccoRandom();
randomer.plantSeed(seed);
randomer.getRand(min, max); // returns a pseudo-random int

.code .procedural .php .c#