e1464fd317
Fixes https://github.com/docker/distribution/issues/3097 Signed-off-by: Yong Wen Chua <lawliet89@users.noreply.github.com>
15 lines
263 B
Go
15 lines
263 B
Go
// +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)
|
|
}
|