MCPcopy Create free account
hub / github.com/assaultcube/AC / floatstr

Function floatstr

source/src/command.cpp:462–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462const char *floatstr(float v, bool neat)
463{
464 static char s[2 * MAXSTRLEN];
465 static int i = 0;
466 if(i > MAXSTRLEN - 10) i = 0;
467 char *t = s + i;
468 formatstring(t)(!neat && (v) == int(v) ? "%.1f" : "%.7g", v); // was ftoa()
469 i += strlen(t) + 1;
470 return t;
471}
472
473void floatret(float v, bool neat)
474{

Callers 13

gettextureslotFunction · 0.85
edittextureslotFunction · 0.85
editmapmodelslotFunction · 0.85
lookupFunction · 0.85
floatretFunction · 0.85
executeretFunction · 0.85
modifyfvarFunction · 0.85
loopvFunction · 0.85
getcurrentmapconfigFunction · 0.85
worldio.cppFile · 0.85
gotopositionFunction · 0.85
loopvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected