MCPcopy Create free account
hub / github.com/ddiakopoulos/polymer / to_json

Function to_json

libraries/lib-engine/include/polymer-engine/object.hpp:43–43  ·  view source on GitHub ↗

Linalg Types

Source from the content-addressed store, hash-verified

41
42 // Linalg Types
43 inline void to_json(json & archive, const int2 & m) { archive = json{ { "x", m.x() },{ "y", m.y() } }; }
44 inline void from_json(const json & archive, int2 & p) { p.x = archive.at("x").get<int32_t>(); p.y = archive.at("y").get<int32_t>(); }
45
46 inline void to_json(json & archive, const int3 & m) { archive = json{ { "x", m.x() },{ "y", m.y() },{ "z", m.z() } }; }

Callers

nothing calls this directly

Calls 2

as_stringMethod · 0.80
visit_fieldsFunction · 0.70

Tested by

no test coverage detected