MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / EncodeFloatDescending

Function EncodeFloatDescending

pkg/util/encoding/float.go:52–57  ·  view source on GitHub ↗

EncodeFloatDescending is the descending version of EncodeFloatAscending.

(b []byte, f float64)

Source from the content-addressed store, hash-verified

50
51// EncodeFloatDescending is the descending version of EncodeFloatAscending.
52func EncodeFloatDescending(b []byte, f float64) []byte {
53 if math.IsNaN(f) {
54 return append(b, floatNaNDesc)
55 }
56 return EncodeFloatAscending(b, -f)
57}
58
59// DecodeFloatAscending returns the remaining byte slice after decoding and the decoded
60// float64 from buf.

Callers 1

EncodeBox2DDescendingFunction · 0.85

Calls 1

EncodeFloatAscendingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…