mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
add docs clarification
This commit is contained in:
parent
9a28fb08db
commit
48a8a9f60e
@ -487,6 +487,8 @@ Returns the seed value.
|
|||||||
|
|
||||||
This function will override the behavior of `Math.random()` to produce a seedable pseudo random number generator.
|
This function will override the behavior of `Math.random()` to produce a seedable pseudo random number generator.
|
||||||
It uses the [seedrandom package](https://www.npmjs.com/package/seedrandom).
|
It uses the [seedrandom package](https://www.npmjs.com/package/seedrandom).
|
||||||
|
Note that calling `setSeed()` will change how `Math.random()` behaves for the entire document.
|
||||||
|
If you have non-jsPsych components on the page that use `Math.random()` they will be affected.
|
||||||
|
|
||||||
Using `setSeed()` without passing in a seed will generate a random 32-bit seed.
|
Using `setSeed()` without passing in a seed will generate a random 32-bit seed.
|
||||||
The seed value will be returned from the function call, allowing you to save it in the data for the experiment if needed.
|
The seed value will be returned from the function call, allowing you to save it in the data for the experiment if needed.
|
||||||
|
Loading…
Reference in New Issue
Block a user