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

Function readDensity

source/EngineInterface/GenomeDescriptionService.cpp:124–127  ·  view source on GitHub ↗

between 0 and 1

Source from the content-addressed store, hash-verified

122 }
123 //between 0 and 1
124 float readDensity(std::vector<uint8_t> const& data, int& pos)
125 {
126 return (readFloat(data, pos) + 1.0f) / 2;
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 {

Callers 1

Calls 1

readFloatFunction · 0.85

Tested by

no test coverage detected