MCPcopy Create free account
hub / github.com/Snapchat/Valdi / toJSONValue

Function toJSONValue

snap_drawing/src/snap_drawing/cpp/Utils/JSONUtils.cpp:14–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12constexpr double kJSONPrecision = 1000;
13
14static Valdi::Value toJSONValue(Scalar value) {
15 return Valdi::Value(round(static_cast<double>(value) * kJSONPrecision) / kJSONPrecision);
16}
17
18Valdi::Value toJSONValue(const Rect& rect) {
19 return Valdi::Value()

Callers 2

TESTFunction · 0.85
toJSONValueMethod · 0.85

Calls 6

roundFunction · 0.85
xMethod · 0.80
yMethod · 0.80
ValueClass · 0.50
widthMethod · 0.45
heightMethod · 0.45

Tested by 1

TESTFunction · 0.68