1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-09 15:12:26 +08:00

doc: update doc for random package

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

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)