mirror of
https://github.com/Luzifer/go_helpers.git
synced 2024-12-25 21:41:20 +00:00
10 lines
286 B
Go
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)
|
|
}
|