View | Details | Raw Unified | Return to bug 201922 | Differences between
and this patch

Collapse All | Expand All

(-)src/giface.cpp (-1 / +1 lines)
Lines 173-179 std::string human_readable(float value, Link Here
173
    }
173
    }
174
    double val = abs(value);
174
    double val = abs(value);
175
    int place = (int)(log(val) / log(base));
175
    int place = (int)(log(val) / log(base));
176
    double num = val / pow(base, place);
176
    double num = val / pow((double)base, place);
177
    sprintf(buf, format, (float)((value > 0) - (value < 0)) * num, suf[place]);
177
    sprintf(buf, format, (float)((value > 0) - (value < 0)) * num, suf[place]);
178
    return string(buf);
178
    return string(buf);
179
}
179
}

Return to bug 201922