Skip to content

Commit

Permalink
UPD better Rand constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Jun 19, 2024
1 parent 4347f42 commit 2ff2968
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dn/Rand.hx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ class Rand {
var seed : #if (flash9 || cpp || hl || neko) Float #else Int #end;
#end

public function new( seed : Int ) {
public function new( seed:Int, callInitSeed=false ) {
this.seed = ((seed < 0) ? -seed : seed) + 131;
if( callInitSeed )
initSeed(seed);
}

public inline function clone() {
Expand Down

0 comments on commit 2ff2968

Please sign in to comment.