MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / numberField

Function numberField

pj_scripting/src/luau_engine.cpp:151–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151std::optional<double> numberField(lua_State* L, int table_idx, const char* key) {
152 lua_rawgetfield(L, table_idx, key);
153 std::optional<double> out;
154 if (lua_isnumber(L, -1)) {
155 out = lua_tonumber(L, -1);
156 }
157 lua_pop(L, 1);
158 return out;
159}
160
161// Top-of-stack Lua scalar -> JSON (numbers/bools/strings; else null).
162nlohmann::json luaScalarToJson(lua_State* L, int idx) {

Callers 1

readParametersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected