asunay/random

This package is abandoned and no longer maintained. The author suggests using the maymeow/random package instead.

Pseudo random generator library

v0.1.2 2017-01-21 13:00 UTC

This package is auto-updated.

Last update: 2022-02-01 13:00:46 UTC


README

I needed pseudo generator which for given seed return stil same values.

Installation

TODO: Describe the installation process

Usage

Create new instance of generator

use AsunaY\XorShift;

// As seed you can use any integer number.
$xs = new XorShift($seed);

Generate random number

$xs->getRand();

or you can set max and min value to get random number from

$xs->getRand(15,50);

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

TODO: Write history

Credits

Charlotta

License

MIT