MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / dItoa

Function dItoa

engine/source/platformAndroid/AndroidStrings.cpp:369–388  ·  view source on GitHub ↗

-Mat hack

Source from the content-addressed store, hash-verified

367
368//-Mat hack
369int dItoa(int n, char s[])
370{
371 int i, sign;
372
373 if ((sign = n) < 0) /* record sign */
374 n = -n; /* make n positivNSStringe */
375 i = 0;
376 do { /* generate digits in reverse order */
377 s[i++] = n % 10 + '0'; /* get next digit */
378 } while ((n /= 10) > 0); /* delete it */
379 if (sign < 0)
380 s[i++] = '-';
381 s[i] = '\0';
382
383 // Reverse string.
384 dStrrev(s);
385
386 // Return length.
387 return dStrlen(s);
388}
389
390//%PUAP%-----------------------------------------------------------------------------------------------------
391

Callers 1

processMultipleTouchesFunction · 0.70

Calls 2

dStrrevFunction · 0.70
dStrlenFunction · 0.70

Tested by

no test coverage detected