summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2016-03-20 18:17:34 +0100
committerwm4 <wm4@nowhere>2016-03-20 19:51:22 +0100
commitb9c48ca8f33e63549f51edb08bd50cc6cc8badbb (patch)
treee02ce982a05e22815a23cd2d75a5e37fa51e7067 /player
parent3353923f2906368fb4d0b1fc0927f9f8fce30cf8 (diff)
downloadmpv-b9c48ca8f33e63549f51edb08bd50cc6cc8badbb.tar.bz2
mpv-b9c48ca8f33e63549f51edb08bd50cc6cc8badbb.tar.xz
playlist: improve shuffle algorithm
The old algorithm produced results which were not uniformly distributed, i.e. some particular shuffles were preferred over others. The new algorithm is an implementation of the Fisher-Yates shuffle which is guaranteed to shuffle uniformly given a sufficiently uniform rand() and ignoring potential floating-point errors. Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'player')
0 files changed, 0 insertions, 0 deletions