1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-10 07:42:27 +08:00

feat: add Sum

This commit is contained in:
dudaodong
2023-06-08 16:18:25 +08:00
parent 83832daeb1
commit c11d63c2e2
3 changed files with 31 additions and 0 deletions

View File

@@ -122,6 +122,18 @@ func ExampleAverage() {
// 1.3
}
func ExampleSum() {
result1 := Sum(1, 2)
result2 := Sum(0.1, float64(1))
fmt.Println(result1)
fmt.Println(result2)
// Output:
// 3
// 1.1
}
func ExampleMax() {
result1 := Max(1, 2, 3)
result2 := Max(1.2, 1.4, 1.1, 1.4)