File tree 2 files changed +163
-114
lines changed
2 files changed +163
-114
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export class Mersenne {
7
7
private gen = new Gen ( ) ;
8
8
9
9
constructor ( ) {
10
- this . gen . init_genrand ( new Date ( ) . getTime ( ) % 1000000000 ) ;
10
+ this . gen . initGenrand ( new Date ( ) . getTime ( ) % 1000000000 ) ;
11
11
12
12
// Bind `this` so namespaced is working correctly
13
13
for ( const name of Object . getOwnPropertyNames ( Mersenne . prototype ) ) {
@@ -36,7 +36,7 @@ export class Mersenne {
36
36
max = 32768 ;
37
37
}
38
38
39
- return Math . floor ( this . gen . genrand_real2 ( ) * ( max - min ) + min ) ;
39
+ return Math . floor ( this . gen . genrandReal2 ( ) * ( max - min ) + min ) ;
40
40
}
41
41
42
42
/**
@@ -50,7 +50,7 @@ export class Mersenne {
50
50
throw new Error ( 'seed(S) must take numeric argument; is ' + typeof S ) ;
51
51
}
52
52
53
- this . gen . init_genrand ( S ) ;
53
+ this . gen . initGenrand ( S ) ;
54
54
}
55
55
56
56
/**
@@ -66,6 +66,6 @@ export class Mersenne {
66
66
) ;
67
67
}
68
68
69
- this . gen . init_by_array ( A , A . length ) ;
69
+ this . gen . initByArray ( A , A . length ) ;
70
70
}
71
71
}
You can’t perform that action at this time.
0 commit comments