diff --git a/float/round.go b/float/round.go index 9c201d0..913f49e 100644 --- a/float/round.go +++ b/float/round.go @@ -3,12 +3,8 @@ package float import "math" // Round returns a float rounded according to "Round to nearest, ties away from zero" IEEE floaing point rounding rule +// +// Deprecated: Starting with Go1.10 this should be replaced with math.Round() func Round(x float64) float64 { - var absx, y float64 - absx = math.Abs(x) - y = math.Floor(absx) - if absx-y >= 0.5 { - y += 1.0 - } - return math.Copysign(y, x) + return math.Round(x) }