mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 02:19:04 +08:00
代码规范过滤,移除冗余代码,替换掉不推荐的包
This commit is contained in:
@@ -8,15 +8,9 @@ package format
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"math"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// RoundInt64 四舍五入
|
||||
func RoundInt64(x float64) int64 {
|
||||
return int64(math.Floor(x + 0/5))
|
||||
}
|
||||
|
||||
// Round2String 四舍五入保留小数,默认2位
|
||||
func Round2String(value float64, args ...interface{}) (v string) {
|
||||
var places = 2
|
||||
|
Reference in New Issue
Block a user