Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
rename random array methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bit101 committed Jan 1, 2022
1 parent bb0f8ae commit 2fd0f71
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions random/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ func IntRange(min int, max int) int {
return int(FloatRange(float64(min), float64(max)))
}

// RandomFloatArray returns an array of a given size filled with random floats from min to max.
func RandomFloatArray(size int, min, max float64) []float64 {
// FloatArray returns an array of a given size filled with random floats from min to max.
func FloatArray(size int, min, max float64) []float64 {
arr := make([]float64, size)
for i := 0; i < size; i++ {
arr[i] = FloatRange(min, max)
}
return arr
}

// RandomIntArray returns an array of a given size filled with random int from min to max.
func RandomIntArray(size int, min, max int) []int {
// IntArray returns an array of a given size filled with random int from min to max.
func IntArray(size int, min, max int) []int {
arr := make([]int, size)
for i := 0; i < size; i++ {
arr[i] = IntRange(min, max)
Expand Down

0 comments on commit 2fd0f71

Please sign in to comment.