mirror of
https://github.com/jefferyjob/go-easy-utils.git
synced 2025-09-26 19:11:12 +08:00
16 lines
207 B
Go
16 lines
207 B
Go
package mathx
|
|
|
|
import "fmt"
|
|
|
|
func ExampleMin() {
|
|
res1 := Min([]int{5, 8, 9, 2, 1})
|
|
res2 := Min([]float64{3.14, 2.0, -0.1, 2.2, 100.11})
|
|
|
|
fmt.Println(res1)
|
|
fmt.Println(res2)
|
|
|
|
// Output:
|
|
// 1
|
|
// -0.1
|
|
}
|