Skip to content

Commit

Permalink
Clarify output range of Rng
Browse files Browse the repository at this point in the history
  • Loading branch information
ericyd committed Jan 25, 2024
1 parent 570faa2 commit ec148f0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lib/random.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/**
* some stuff in this file copy/pasted from
* The seedable PRNG functions are taken from this SO question:
* https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript
* And specifically this insanely thorough answer:
* https://stackoverflow.com/a/47593316/3991555
*/

/**
* @callback Rng
* @returns {number} in range [0, 1)
*/

/**
Expand Down Expand Up @@ -55,12 +62,6 @@ export function sfc32(a, b, c, d) {
};
}

/**
* @callback Rng
* @returns {number} in range [0, 1)
* TODO@v1: not really sure what the range is, could be [0, 1] or (0, 1)
*/

/**
* @param {string} seed
* @returns {Rng}
Expand Down

0 comments on commit ec148f0

Please sign in to comment.