github.com/GuanceCloud/cliutils@v1.1.21/pprofparser/tools/mathtoolkit/math.go (about) 1 package mathtoolkit 2 3 import "math" 4 5 func Trunc(x float64) int64 { 6 return int64(math.Trunc(x)) 7 } 8 9 func Floor(x float64) int64 { 10 return int64(math.Floor(x)) 11 } 12 13 func Ceil(x float64) int64 { 14 return int64(math.Ceil(x)) 15 }