MCPcopy
hub / github.com/google/go-cmp / roundF64

Function roundF64

cmp/example_test.go:252–257  ·  cmp/example_test.go::roundF64
(z float64)

Source from the content-addressed store, hash-verified

250}
251
252func roundF64(z float64) float64 {
253 if z < 0 {
254 return math.Ceil(z - 0.5)
255 }
256 return math.Floor(z + 0.5)
257}
258
259// The complex numbers complex64 and complex128 can really just be decomposed
260// into a pair of float32 or float64 values. It would be convenient to be able

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected