MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / jsonToVec3I

Function jsonToVec3I

source/core/StarJsonExtra.cpp:92–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92Vec3I jsonToVec3I(Json const& v) {
93 if (v.type() != Json::Type::Array || v.size() != 3)
94 throw JsonException("Json not an array of size 3 in jsonToVec3I");
95
96 return Vec3I(v.getInt(0), v.getInt(1), v.getInt(2));
97}
98
99Json jsonFromVec3I(Vec3I const& v) {
100 JsonArray result;

Callers 6

CelestialChunkMethod · 0.85
CelestialCoordinateMethod · 0.85
QuestMethod · 0.85
makeQuestCallbacksMethod · 0.85
fromJsonMethod · 0.85
SystemWorldServerMethod · 0.85

Calls 3

getIntMethod · 0.80
typeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected