Skip to content

Commit 8797fdb

Browse files
committed
Commenting
1 parent 8f49312 commit 8797fdb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

helpers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ func Round(val float64) int {
8383
return int(val + 0.5)
8484
}
8585

86+
// ToFixed rounds to the specified decimal place
8687
func ToFixed(num float64, precision int) float64 {
8788
output := math.Pow(10, float64(precision))
8889
return float64(Round(num*output)) / output

0 commit comments

Comments
 (0)