utils 新增方法

This commit is contained in:
苏尹岚
2020-04-27 14:10:29 +08:00
parent 4bcfacfcdc
commit 547b703e10

View File

@@ -538,3 +538,7 @@ func IntSlice2Int64(intList []int) (outList []int64) {
func Int2Float64(i int) (f float64) {
return Str2Float64(Int64ToStr(int64(i)))
}
func Float32ToInt(f float32) (i int) {
return int(Str2Int64(Float64ToStr(math.Round(float64(f)))))
}