📅  最后修改于: 2022-03-11 14:45:01.658000             🧑  作者: Mango
x := 12.3456
fmt.Println(math.Floor(x*100)/100) // 12.34 (round down)
fmt.Println(math.Round(x*100)/100) // 12.35 (round to nearest)
fmt.Println(math.Ceil(x*100)/100) // 12.35 (round up)