UNPKG
d3-hierarchy
Version:
latest (3.1.2)
next (2.0.0-rc.4)
3.1.2
3.1.1
3.1.0
3.0.1
3.0.0
2.0.0
2.0.0-rc.4
2.0.0-rc.3
2.0.0-rc.2
2.0.0-rc.1
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
0.3.0
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0
0.0.2
0.0.1
Layout algorithms for visualizing hierarchical data.
d3js.org/d3-hierarchy/
d3/d3-hierarchy
d3-hierarchy
/
src
/
lcg.js
10 lines
(8 loc)
•
245 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use
const
a =
1664525
;
const
c =
1013904223
;
const
m =
4294967296
;
// 2^32
export
default
function
(
) {
let
s =
1
;
return
() =>
(s = (a * s + c) % m) / m; }