The help for this file says that a 0 as the third input removes duplicates and 1 keeps them (lines 23-25). This is backward. It is listed correctly in the example however. Otherwise, its a useful function.
Better now. But further testing found a new bug. Sampling 2 integers from a range that is 4 integers long or longer works fine.
But, if I want exactly 2 random integers from the set [1 2 3], I only get 1 integer.
The other improvements bring this much closer to a 5. I'd have rated it a 5 until I found this problem. Since this bug (it should be a trivial fix) would push me down to a 4 rating, I won't propose a new rating until I check back for the repaired version.