changed order of operations to fix bug

This commit is contained in:
Filip Kopyt 2022-12-14 20:46:07 +01:00
parent 00cb558561
commit 1d395163e1

View file

@ -153,7 +153,7 @@ const layer = createLayer(id, function (this: BaseLayer) {
if (Decimal.gte(v, 100)) v = Decimal.mul(v, 100).root(2);
if (options.elfName === "Star" || options.elfName === "Bell")
v = Decimal.root(v, 2);
if (options.elfName === "Star" && Decimal.gte(v, 10)) v = v.mul(10).log10();
if (options.elfName === "Star" && Decimal.gte(v, 10)) v = v.log10().mul(10);
return Decimal.isNaN(v) ? Decimal.dZero : v.floor().max(0);
},
style: "width: 600px",