clearing:: fixed some bugs when reached too far into the center

This commit is contained in:
Zeno Rogue
2020-03-07 04:47:10 +01:00
parent 62734bbfc5
commit 70d7fde8d4
4 changed files with 28 additions and 11 deletions
+2 -8
View File
@@ -255,14 +255,8 @@ bool displayglyph(int cx, int cy, int buttonsize, char glyph, color_t color, int
buttonsize / 3;
if(id == moMutant + ittypes && clearing::imputed.nonzero()) {
ld d = qty + clearing::imputed.approx_ld();
if(d < 100000) str = its(int(d));
else {
int digits = 0;
while(d >= 10) digits++, d /= 10;
str = its(int(d*100)) + "E" + its(digits);
str.insert(1, ".");
}
bignum bn = clearing::imputed + qty;
str = short_form(bn);
bsize = buttonsize / 4;
}