mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-12 10:10:25 +00:00
✏️ 分离 data
This commit is contained in:
18
utils/math/math.go
Normal file
18
utils/math/math.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// Package math 计算实用工具
|
||||
package math
|
||||
|
||||
// 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