KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
hxprng
★ 8
Open GitHub ↗
Pseudorandom number generator
Download README (.md)
Explore Similar Repositories
phpstorm-laravel-snippets
:
phpstorm Laravel snippets Plugin
math-ts
:
Math Tool and Typescript Llibrary
Mention
:
No description available.
myminecraft
:
我的世界的python实现,根据https://github.com/fogleman/Minecraft 重构
FA_Patcher
:
A tool for binary patching (.exe) binary files
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
hxprng
?
Download (.md)
# hxprng At the moment implements only [PCG](http://www.pcg-random.org/) random number generator ## Usage You should call method `random(n:Int)` . This will return a random integer between 0 included and n excluded. ```haxe var pg: PCG32 = new PCG32(); var rnd : Int = pg.random(6) + 1; //add 1 to return a value between 1 and 6 (included) trace("Dice : " + rnd); ``` To get random number between range ( min - max) you can use `randomFromRange(min:Int, max:Int)` , where min < max ```haxe var pg: PCG32 = new PCG32(); var month : Int = pg.randomFromRange(1,12); // return a value between 1 and 12 (included) trace("Month : " + month); ``` ## License Apache 2.0 is used for PCG number generator MIT license for all other number generators