summaryrefslogtreecommitdiff
path: root/round.go
diff options
context:
space:
mode:
Diffstat (limited to 'round.go')
-rw-r--r--round.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/round.go b/round.go
index 1962ea6..d754f1a 100644
--- a/round.go
+++ b/round.go
@@ -2,16 +2,6 @@ package float
import "math"
-// ISO 80000-1:2012
-// q = \sgn(y) \left\lfloor \left| y \right| + 0.5 \right\rfloor
-// = -\sgn(y) \left\lceil -\left| y \right| - 0.5 \right\rceil
-
-// RoundN a float value to n decimal places
-func RoundN(x float64, n int) float64 {
- pow := math.Pow(10, float64(n))
- return Round(x*pow) / pow
-}
-
// Round a float value
// https://www.cockroachlabs.com/blog/rounding-implementations-in-go/
func Round(x float64) float64 {