Skip to content

Commit

Permalink
simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Jun 13, 2024
1 parent aab8903 commit 20ebb1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/rand/uniform.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,6 @@ func (p *PRNG) Shuffle(n int, swap func(i, j int)) {
// Nevertheless, the right API signature accepts an int n, so handle it as best we can.
for i := n - 1; i > 0; i-- {
j := int(p.Uint64n(uint64(i + 1)))
swap(int(i), int(j))
swap(i, j)
}
}

0 comments on commit 20ebb1c

Please sign in to comment.