We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f49312 commit 8797fdbCopy full SHA for 8797fdb
helpers.go
@@ -83,6 +83,7 @@ func Round(val float64) int {
83
return int(val + 0.5)
84
}
85
86
+// ToFixed rounds to the specified decimal place
87
func ToFixed(num float64, precision int) float64 {
88
output := math.Pow(10, float64(precision))
89
return float64(Round(num*output)) / output
0 commit comments