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

Function jsonToVec4F

source/core/StarJsonExtra.cpp:128–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128Vec4F jsonToVec4F(Json const& v) {
129 if (v.type() != Json::Type::Array || v.size() != 4)
130 throw JsonException("Json not an array of size 4 in jsonToVec4B");
131
132 return Vec4F(v.getFloat(0), v.getFloat(1), v.getFloat(2), v.getFloat(3));
133}
134
135RectD jsonToRectD(Json const& v) {
136 if (v.type() != Json::Type::Array)

Callers 2

processActionMethod · 0.85
loadEffectConfigMethod · 0.85

Calls 3

getFloatMethod · 0.80
typeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected