doc: update doc for random package

This commit is contained in:
dudaodong committed 2023-12-08 11:57:39 +08:00
1 parent 6e5b67bee7
commit a995db445a
5 files changed
+150 -6

No files matched your search

+2 -2
View File
@@ -163,8 +163,8 @@ func RandUniqueIntSlice(n, min, max int) []int {
return nums
}
// RandFloats generate a slice of random float64 of length n that do not repeat.
// Play: https://go.dev/play/p/uBkRSOz73Ec
// RandFloats generate a slice of random float64 numbers of length n that do not repeat.
// Play: todo
func RandFloats(n int, min, max float64, precision int) []float64 {
nums := make([]float64, n)
used := make(map[float64]struct{}, n)