| 21 | } |
| 22 | |
| 23 | Vec2D jsonToVec2D(Json const& v) { |
| 24 | if (v.type() != Json::Type::Array || v.size() != 2) |
| 25 | throw JsonException("Json not an array of size 2 in jsonToVec2D"); |
| 26 | |
| 27 | return Vec2D(v.getDouble(0), v.getDouble(1)); |
| 28 | } |
| 29 | |
| 30 | Vec2F jsonToVec2F(Json const& v) { |
| 31 | if (v.type() != Json::Type::Array || v.size() != 2) |
no test coverage detected