Golang 小数 四舍五入 最简便方法 go 小数 四舍五入

时间:2021-07-22 16:48:04   收藏:0   阅读:17
func round(x float64){
return int(math.Floor(x + 0/5))
}
func round(x float64){
return int(math.Floor(x + 0/5))
}
func round(x float64){
return int(math.Floor(x + 0/5))
}
func round(x float64){
return int(math.Floor(x + 0/5))
}
func round(x float64){
return int(math.Floor(x + 0/5))
}
func round(x float64){
return int(math.Floor(x + 0/5))
}
func round(x float64){
return int(math.Floor(x + 0/5))
}

原文:https://www.cnblogs.com/arvin-an/p/15044083.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!