Skip to content

Commit

Permalink
execution
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronchen2k committed May 26, 2024
1 parent f97dc9e commit 2d9e252
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ func (generator *numberGenerator) getMinMax(schema *openapi3.Schema) (float64, f

func (generator *numberGenerator) generateUniformRandomValue(schema *openapi3.Schema) float64 {
minimum := 0
maximum := math.MaxInt64
maximum := math.MaxInt32

if schema.ExclusiveMin {
minimum++
}
Expand All @@ -62,8 +63,8 @@ func (generator *numberGenerator) generateUniformRandomValue(schema *openapi3.Sc
}
delta := maximum - minimum

value1 := float64(generator.random.Intn(delta)+minimum) / float64(math.MaxInt64)
value2 := float64(generator.random.Intn(delta)+minimum) / float64(math.MaxInt64)
value1 := float64(generator.random.Intn(delta)+minimum) / float64(maximum)
value2 := float64(generator.random.Intn(delta)+minimum) / float64(maximum)

return value1 * value2
}

0 comments on commit 2d9e252

Please sign in to comment.