1
0
Fork 0
mirror of https://github.com/Luzifer/go_helpers.git synced 2024-10-18 14:24:20 +00:00
go_helpers/float/round.go
Knut Ahlers 80ba8d5dd9
Replace and deprecate float.Round method
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2023-10-23 19:31:13 +02:00

10 lines
286 B
Go

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)
}