UNPKG
@extra-array/shuffle.min
Version:
latest (2.3.2)
2.3.2
2.3.1
2.3.0
2.2.17
2.2.16
2.2.15
2.2.13
2.2.12
2.2.11
2.2.10
2.2.9
2.2.8
2.2.7
Rearranges values in arbitrary order.
github.com/nodef/extra-array
nodef/extra-array
@extra-array/shuffle.min
/
_mulberry32.js
10 lines
(9 loc)
•
244 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
function
mulberry32
(
a
) {
return
function
(
) {
var
t = a +=
0x6D2B79F5
; t =
Math
.
imul
(t ^ t >>>
15
, t |
1
); t ^= t +
Math
.
imul
(t ^ t >>>
7
, t |
61
);
return
((t ^ t >>>
14
) >>>
0
) /
4294967296
; } }
module
.
exports
= mulberry32;