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

Function jsonToVec2F

source/core/StarJsonExtra.cpp:30–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30Vec2F jsonToVec2F(Json const& v) {
31 if (v.type() != Json::Type::Array || v.size() != 2)
32 throw JsonException("Json not an array of size 2 in jsonToVec2F");
33
34 return Vec2F(v.getFloat(0), v.getFloat(1));
35}
36
37Json jsonFromVec2F(Vec2F const& v) {
38 return JsonArray{v[0], v[1]};

Callers 15

parsePersonalityArrayFunction · 0.85
StarHumanoid.cppFile · 0.85
HumanoidIdentityMethod · 0.85
loadConfigMethod · 0.85
spawnTargetFromJsonFunction · 0.85
spawnTypeFromJsonFunction · 0.85
loungeAnchorMethod · 0.85
readTenantMethod · 0.85
readJsonMethod · 0.85
loadStateMethod · 0.85
ItemDropMethod · 0.85
AnimationMethod · 0.85

Calls 3

getFloatMethod · 0.80
typeMethod · 0.45
sizeMethod · 0.45

Tested by 1

InspectionToolMethod · 0.68