mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 18:20:27 +00:00
✏️ 收集 max / min 到 data 包
This commit is contained in:
17
data/math.go
Normal file
17
data/math.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package data
|
||||
|
||||
// min 返回两数最大值,该函数将被内联
|
||||
func Max(a, b int) int {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// min 返回两数最小值,该函数将被内联
|
||||
func Min(a, b int) int {
|
||||
if a > b {
|
||||
return b
|
||||
}
|
||||
return a
|
||||
}
|
||||
Reference in New Issue
Block a user