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

Function writeStiffness

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

Source from the content-addressed store, hash-verified

58 data.emplace_back(static_cast<uint8_t>((value - 0.5f) * 255));
59 }
60 void writeStiffness(std::vector<uint8_t>& data, float value) { data.emplace_back(static_cast<uint8_t>(value * 255)); }
61 void writeGenome(std::vector<uint8_t>& data, std::variant<MakeGenomeCopy, std::vector<uint8_t>> const& value)
62 {
63 auto makeGenomeCopy = std::holds_alternative<MakeGenomeCopy>(value);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected