Increase number of digits needed before shortening numbers such as 3.7e+9

This commit is contained in:
Jonatan Heyman 2023-03-02 21:00:00 +01:00
parent 82f916122c
commit 686dc77e78

View File

@ -49,7 +49,11 @@ function mathDeco(view) {
// if we got a result from math.js, add the result decoration
if (result !== undefined) {
builder.add(line.to, line.to, Decoration.widget({widget: new MathResult(math.format(result, 8)), side: 1}))
builder.add(line.to, line.to, Decoration.widget({widget: new MathResult(math.format(result, {
precision: 8,
upperExp: 8,
lowerExp: -6,
})), side: 1}))
}
}
pos = line.to + 1