mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+fix: Tinyexpr: integer values always shown in abs() format
This commit is contained in:
parent
5a68791ee2
commit
53ededdc78
@ -683,10 +683,9 @@ static inline void ResetFileObservationData(const bool bResetEvt) {
|
||||
|
||||
void TinyExprToStringA(LPSTR pszDest, size_t cchDest, const double dExprEval)
|
||||
{
|
||||
double idbl = 0.0;
|
||||
double const fracpart = fabs(modf(dExprEval, &idbl));
|
||||
double const intpart = fabs(idbl);
|
||||
if ((fracpart < TE_ZERO) && (intpart < 1.0E+21)) {
|
||||
double intpart = 0.0;
|
||||
double const fracpart = modf(dExprEval, &intpart);
|
||||
if ((fabs(fracpart) < TE_ZERO) && (fabs(intpart) < 1.0E+21)) {
|
||||
StringCchPrintfA(pszDest, cchDest, "%.21G", intpart); // integer full number display
|
||||
}
|
||||
else {
|
||||
@ -697,10 +696,9 @@ void TinyExprToStringA(LPSTR pszDest, size_t cchDest, const double dExprEval)
|
||||
|
||||
void TinyExprToString(LPWSTR pszDest, size_t cchDest, const double dExprEval)
|
||||
{
|
||||
double idbl = 0.0;
|
||||
double const fracpart = fabs(modf(dExprEval, &idbl));
|
||||
double const intpart = fabs(idbl);
|
||||
if ((fracpart < TE_ZERO) && (intpart < 1.0E+21)) {
|
||||
double intpart = 0.0;
|
||||
double const fracpart = modf(dExprEval, &intpart);
|
||||
if ((fabs(fracpart) < TE_ZERO) && (fabs(intpart) < 1.0E+21)) {
|
||||
StringCchPrintf(pszDest, cchDest, L"%.21G", intpart); // integer full number display
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user