Make functions exportable

This commit is contained in:
raul 2024-01-30 19:48:33 +01:00
parent 6904b8d3d3
commit a25a49c11f
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ package minmax
// TODO: Handle empty arrays without panicking
func min(arr []float64) (min float64) {
func Min(arr []float64) (min float64) {
min = arr[0]
for _, v := range arr {
if v < min {
@ -14,7 +14,7 @@ func min(arr []float64) (min float64) {
return min
}
func max(arr []float64) (max float64) {
func Max(arr []float64) (max float64) {
max = arr[0]
for _, v := range arr {
if v > max {