github.com/aavshr/aws-sdk-go@v1.41.3/internal/sdkmath/floor.go (about) 1 //go:build go1.10 2 // +build go1.10 3 4 package sdkmath 5 6 import "math" 7 8 // Round returns the nearest integer, rounding half away from zero. 9 // 10 // Special cases are: 11 // Round(±0) = ±0 12 // Round(±Inf) = ±Inf 13 // Round(NaN) = NaN 14 func Round(x float64) float64 { 15 return math.Round(x) 16 }