Debian Codegraph @

3rdparty/dissection/src/qd/util.cpp

raw
1 #include <cstdlib>
2 #include "util.h"
3
4 void append_expn(std::string &str, int expn) {
5 int k;
6
7 str += (expn < 0 ? '-' : '+');
8 expn = std::abs(expn);
9
10 if (expn >= 100) {
11 k = (expn / 100);
12 str += '0' + k;
13 expn -= 100*k;
14 }
15
16 k = (expn / 10);
17 str += '0' + k;
18 expn -= 10*k;
19
20 str += '0' + expn;
21 }
22