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

Function readFloat

source/EngineInterface/GenomeDescriptionService.cpp:109–112  ·  view source on GitHub ↗

between -1 and 1

Source from the content-addressed store, hash-verified

107 }
108 //between -1 and 1
109 float readFloat(std::vector<uint8_t> const& data, int& pos)
110 {
111 return static_cast<float>(static_cast<int8_t>(readByte(data, pos))) / 128;
112 }
113 //between -180 and 180
114 float readAngle(std::vector<uint8_t> const& data, int& pos)
115 {

Callers 3

readEnergyFunction · 0.85
readDensityFunction · 0.85
readNeuronPropertyFunction · 0.85

Calls 1

readByteFunction · 0.85

Tested by

no test coverage detected