mirror of
https://github.com/MontFerret/ferret.git
synced 2025-03-17 21:18:37 +02:00
parent
526916efb6
commit
f0097e984e
@ -5,6 +5,7 @@ import (
|
||||
"math"
|
||||
"math/rand"
|
||||
"reflect"
|
||||
"time"
|
||||
)
|
||||
|
||||
func IsNil(input interface{}) bool {
|
||||
@ -46,6 +47,7 @@ func NumberLowerBoundary(input float64) float64 {
|
||||
}
|
||||
|
||||
func Random(max float64, min float64) float64 {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
r := rand.Float64()
|
||||
i := r * (max - min + 1)
|
||||
out := math.Floor(i) + min
|
||||
|
Loading…
x
Reference in New Issue
Block a user