blob: 44898eed0fdd729574d20a033720ba29ee3cd559 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// +build go1.10
package sdkmath
import "math"
// Round returns the nearest integer, rounding half away from zero.
//
// Special cases are:
// Round(±0) = ±0
// Round(±Inf) = ±Inf
// Round(NaN) = NaN
func Round(x float64) float64 {
return math.Round(x)
}
|