Skip to content
Commit f0fd0413 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

gib_list_randomize: use code better suited for short lists (closes #151)

Note that the i == r check was never reached in the original code but may be
in the new variant. Since a shuffled list may well have one or two elements
retain their absolute position once in a while, this should not be a problem.

tests with 2- and 3-element lists show an even distribution amongst all
elements.
parent 68037c4d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment