fyinthesky2011@gmail.com
func Round(f float64, n int) float64 {pow10_n := math.Pow10(n)return math.Trunc((f+0.5/pow10_n)*pow10_n) / pow10_n}
posted on 2015-04-10 13:56 rojas 阅读(722) 评论(0) 编辑 收藏 举报