Skip to content

Commit

Permalink
Fixed super rare glitch in the mersenne package
Browse files Browse the repository at this point in the history
  • Loading branch information
bramvandijk88 committed Mar 27, 2022
1 parent 9e450c0 commit 877411f
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/cacatoo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ function MersenneTwister(seed) {

/* generates a random int between [min,max] */
MersenneTwister.prototype.genrand_int = function(min,max) {
return min+Math.floor(this.genrand_real1()*(max));
return min+Math.floor(this.genrand_real2()*(max));
};

/* generates a random number on [0,1)-real-interval */
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdocs/Canvas.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Canvas.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 24 2022 17:16:53 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Mar 27 2022 22:46:01 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdocs/Graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Canvas.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 24 2022 17:16:53 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Mar 27 2022 22:46:01 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdocs/Gridmodel.html
Original file line number Diff line number Diff line change
Expand Up @@ -8100,7 +8100,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Canvas.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 24 2022 17:16:53 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Mar 27 2022 22:46:01 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdocs/Gridpoint.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Canvas.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 24 2022 17:16:53 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Mar 27 2022 22:46:01 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdocs/ODE.html
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Canvas.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 24 2022 17:16:53 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Mar 27 2022 22:46:01 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdocs/Simulation.html
Original file line number Diff line number Diff line change
Expand Up @@ -5342,7 +5342,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Canvas.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 24 2022 17:16:53 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Mar 27 2022 22:46:01 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/jsdocs/cacatoo.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -1867,7 +1867,7 @@ <h1 class="page-title">Source: cacatoo.js</h1>

/* generates a random int between [min,max] */
MersenneTwister.prototype.genrand_int = function(min,max) {
return min+Math.floor(this.genrand_real1()*(max));
return min+Math.floor(this.genrand_real2()*(max));
};

/* generates a random number on [0,1)-real-interval */
Expand Down Expand Up @@ -2865,7 +2865,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Canvas.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 24 2022 17:16:53 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Mar 27 2022 22:46:01 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdocs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Canvas.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 24 2022 17:16:53 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Mar 27 2022 22:46:01 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/jsdocs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Canvas.ht
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Thu Mar 24 2022 17:16:53 GMT+0100 (Central European Standard Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Sun Mar 27 2022 22:46:01 GMT+0200 (Central European Summer Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/scripts/cacatoo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ function MersenneTwister(seed) {

/* generates a random int between [min,max] */
MersenneTwister.prototype.genrand_int = function(min,max) {
return min+Math.floor(this.genrand_real1()*(max));
return min+Math.floor(this.genrand_real2()*(max));
};

/* generates a random number on [0,1)-real-interval */
Expand Down
2 changes: 1 addition & 1 deletion lib/all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/mersenne.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function MersenneTwister(seed) {

/* generates a random int between [min,max] */
MersenneTwister.prototype.genrand_int = function(min,max) {
return min+Math.floor(this.genrand_real1()*(max));
return min+Math.floor(this.genrand_real2()*(max));
}

/* generates a random number on [0,1)-real-interval */
Expand Down
2 changes: 1 addition & 1 deletion lib/mersenne_browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function MersenneTwister(seed) {

/* generates a random int between [min,max] */
MersenneTwister.prototype.genrand_int = function(min,max) {
return min+Math.floor(this.genrand_real1()*(max));
return min+Math.floor(this.genrand_real2()*(max));
}

/* generates a random number on [0,1)-real-interval */
Expand Down

0 comments on commit 877411f

Please sign in to comment.