assert(prefix >= 0);
assert(prefix < countof(SIPrefixes));
+ const double multiplier = pow(0.1, prefix * 3 + FirstSIPrefixPower);
+
const int text_height = p.boundingRect(0, 0, INT_MAX, INT_MAX,
Qt::AlignLeft | Qt::AlignTop, "8").height();
// Draw a major tick
QString s;
QTextStream ts(&s);
- ts << (t / order_decimal) << SIPrefixes[prefix] << "s";
+ ts << (t * multiplier) << SIPrefixes[prefix] << "s";
p.drawText(x, 0, 0, text_height, Qt::AlignCenter |
Qt::AlignTop | Qt::TextDontClip, s);
p.drawLine(x, text_height, x, height());