mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
doc: update doc for random package
This commit is contained in:
1 parent
6e5b67bee7
commit
a995db445a
5 files changed
+150
-6
No files matched your search
+2
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user