Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yyin-sc committed Aug 4, 2021
1 parent 53cda3d commit adb36c7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/query/graphite/native/builtin_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1041,9 +1041,8 @@ func (impl *exponentialMovingAverageImpl) Evaluate(
func roundTo(n float64, decimals int32) float64 {
if decimals < 0 {
return math.Round(n/math.Pow(10, math.Abs(float64(decimals)))) * math.Pow(10, math.Abs(float64(decimals)))
} else {
return math.Round(n*math.Pow(10, float64(decimals))) / math.Pow(10, float64(decimals))
}
return math.Round(n*math.Pow(10, float64(decimals))) / math.Pow(10, float64(decimals))
}

// totalFunc takes an index and returns a total value for that index
Expand Down

0 comments on commit adb36c7

Please sign in to comment.