MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / cJSON_CreateDouble

Function cJSON_CreateDouble

eval/LANE_evaluation/lane2d/src/cJSON.c:1003–1014  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001 return item;
1002}
1003cJSON *cJSON_CreateDouble(double num, int sign)
1004{
1005 cJSON *item = cJSON_New_Item();
1006 if (item)
1007 {
1008 item->type = cJSON_Double;
1009 item->valuedouble = num;
1010 item->valueint = (int64)num;
1011 item->sign = sign;
1012 }
1013 return item;
1014}
1015cJSON *cJSON_CreateInt(uint64 num, int sign)
1016{
1017 cJSON *item = cJSON_New_Item();

Callers 6

AddMethod · 0.85
ReplaceMethod · 0.85
AddAsFirstMethod · 0.85
cJSON_CreateIntArrayFunction · 0.85
cJSON_CreateFloatArrayFunction · 0.85
cJSON_CreateDoubleArrayFunction · 0.85

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected