We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09944a2 commit b653addCopy full SHA for b653add
internal/getters/decimal.go
@@ -2,7 +2,6 @@ package getters
2
3
import (
4
"fmt"
5
- "math"
6
"math/rand"
7
)
8
@@ -14,7 +13,11 @@ type RandomDecimal struct {
14
13
}
15
16
func (r *RandomDecimal) Value() interface{} {
17
- f := rand.Float64() * float64(rand.Int63n(int64(math.Pow10(int(r.size)))))
+ size := r.size
+ if size > 10 {
18
+ size = 10
19
+ }
20
+ f := rand.Float64() * float64(rand.Int63n(int64(size)))
21
return f
22
23
0 commit comments