Ignore:
Timestamp:
07/22/19 01:16:11 (14 months ago)
Author:
Maciej Komosinski
Message:

Code formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/sstring.cpp

    r826 r889  
    5252{
    5353        size = guessMemSize(initsize);
    54         if (size > 0)   { txt = (char*)malloc(size + 1); txt[0] = 0; }
     54        if (size > 0) { txt = (char*)malloc(size + 1); txt[0] = 0; }
    5555        else    txt = (char*)"";
    5656        used = 0;
     
    368368#ifdef USE_PRINTFLOAT_DRAGON4
    369369        SString tmp;
    370         char* here=tmp.directWrite(30);
    371         tmp.endWrite(PrintFloat64(here,30,d,
    372                                   ((d<-1e17)||(d>1e17)||((d<1e-4)&&(d>-1e-4)&&(d!=0.0)))
    373                                   ? PrintFloatFormat_Scientific : PrintFloatFormat_Positional,
    374                                   -1));//http://www.ryanjuckett.com/programming/printing-floating-point-numbers/
     370        char* here = tmp.directWrite(30);
     371        tmp.endWrite(PrintFloat64(here, 30, d,
     372                ((d < -1e17) || (d > 1e17) || ((d < 1e-4) && (d > -1e-4) && (d != 0.0)))
     373                ? PrintFloatFormat_Scientific : PrintFloatFormat_Positional,
     374                -1));//http://www.ryanjuckett.com/programming/printing-floating-point-numbers/
    375375#else
    376376        SString tmp = SString::sprintf("%.17g", d); //https://stackoverflow.com/questions/16839658/printf-width-specifier-to-maintain-precision-of-floating-point-value
Note: See TracChangeset for help on using the changeset viewer.