MCPcopy Create free account
hub / github.com/dotabuff/manta / floatFactory

Function floatFactory

field_decoder.go:70–85  ·  view source on GitHub ↗
(f *field)

Source from the content-addressed store, hash-verified

68}
69
70func floatFactory(f *field) fieldDecoder {
71 switch f.encoder {
72 case "coord":
73 return floatCoordDecoder
74 case "simtime":
75 return simulationTimeDecoder
76 case "runetime":
77 return runeTimeDecoder
78 }
79
80 if f.bitCount == nil || (*f.bitCount <= 0 || *f.bitCount >= 32) {
81 return noscaleDecoder
82 }
83
84 return quantizedFactory(f)
85}
86
87func quantizedFactory(f *field) fieldDecoder {
88 qfd := newQuantizedFloatDecoder(f.bitCount, f.encodeFlags, f.lowValue, f.highValue)

Callers 1

vectorFactoryFunction · 0.85

Calls 1

quantizedFactoryFunction · 0.85

Tested by

no test coverage detected