Parcourir la source

added init(seed)

ncannasse il y a 12 ans
Parent
commit
9f63568414
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      hxd/Rand.hx

+ 4 - 0
hxd/Rand.hx

@@ -6,6 +6,10 @@ class Rand {
 	var seed2 : Int;
 
 	public function new( seed : Int ) {
+		init(seed);
+	}
+	
+	public function init(seed : Int) {
 		this.seed = seed;
 		this.seed2 = hash(seed);
 		if( this.seed == 0 ) this.seed = 1;