now using this.seed
instead of seed
This commit is contained in:
parent
48abd6274f
commit
89a44cf837
@ -102,8 +102,8 @@ function RNG(seed) {
|
|||||||
this.random = function(min,max) {
|
this.random = function(min,max) {
|
||||||
if(!min)min=0
|
if(!min)min=0
|
||||||
if(!max)max=1
|
if(!max)max=1
|
||||||
seed += Math.log(Math.abs(Math.sin(seed))*100)
|
this.seed += Math.log(Math.abs(Math.sin(this.seed))*100)
|
||||||
return Math.abs(Math.sin(seed))*max + min
|
return Math.abs(Math.sin(this.seed))*max + min
|
||||||
}
|
}
|
||||||
this.rand = function(min,max) {
|
this.rand = function(min,max) {
|
||||||
return Math.floor(this.random(min,max))
|
return Math.floor(this.random(min,max))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user