1
0
mirror of https://github.com/d3/d3.git synced 2025-12-08 19:46:24 +00:00

fix broken link (#4084)

https://d3js.org/d3-force/simulation#simulation_randomSource

alternative to #4082
This commit is contained in:
Philippe Rivière 2025-12-02 09:48:11 -08:00 committed by GitHub
parent 66bfe8c667
commit 42ccb63d8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,9 +108,7 @@ simulation.force("charge", null);
## *simulation*.randomSource(*source*) {#simulation_randomSource}
[Source](https://github.com/d3/d3-force/blob/main/src/simulation.js "Source"))
If *source* is specified, sets the function used to generate random numbers; this should be a function that returns a number between 0 (inclusive) and 1 (exclusive). If *source* is not specified, returns this simulations current random source which defaults to a fixed-seed [linear congruential generator](https://en.wikipedia.org/wiki/Linear_congruential_generator). See also [*random*.source](../d3-random.md#random_source).
[Source](https://github.com/d3/d3-force/blob/main/src/simulation.js) · If *source* is specified, sets the function used to generate random numbers; this should be a function that returns a number between 0 (inclusive) and 1 (exclusive). If *source* is not specified, returns this simulations current random source which defaults to a fixed-seed [linear congruential generator](https://en.wikipedia.org/wiki/Linear_congruential_generator). See also [*random*.source](../d3-random.md#random_source).
## *simulation*.on(*typenames*, *listener*) {#simulation_on}