MCPcopy Create free account
hub / github.com/chrxh/alien / readDistance

Function readDistance

source/EngineInterface/GenomeDescriptionService.cpp:129–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127 }
128 float readNeuronProperty(std::vector<uint8_t> const& data, int& pos) { return readFloat(data, pos) * 4; }
129 float readDistance(std::vector<uint8_t> const& data, int& pos)
130 {
131 return toFloat(readByte(data, pos)) / 255 + 0.5f;
132 }
133 float readStiffness(std::vector<uint8_t> const& data, int& pos)
134 {
135 return toFloat(readByte(data, pos)) / 255;

Callers 1

Calls 2

toFloatFunction · 0.85
readByteFunction · 0.85

Tested by

no test coverage detected