1
0
Fork 0
mirror of https://github.com/Luzifer/go_helpers.git synced 2024-12-26 14:01:20 +00:00
go_helpers/float/round.go

11 lines
286 B
Go
Raw Normal View History

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 {
return math.Round(x)
}