📅  最后修改于: 2022-03-11 14:45:01.167000             🧑  作者: Mango
// Rounds float64 number to nbDigits
func Round(num float64, nbDigits float64) float64 {
pow := math.Pow(10., nbDigits)
rounded := float64(int(num*pow)) / pow
return rounded
}