fix a regression in formatValue, concerning the number of decimals
This commit is contained in:
parent
fb385a5e57
commit
97810bb472
1 changed files with 1 additions and 1 deletions
|
@ -546,7 +546,7 @@ Ox.formatValue = function(num, str, bin) {
|
||||||
val;
|
val;
|
||||||
Ox.forEach(Ox.PREFIXES, function(chr, i) {
|
Ox.forEach(Ox.PREFIXES, function(chr, i) {
|
||||||
if (num < Math.pow(base, i + 1) || i == len - 1) {
|
if (num < Math.pow(base, i + 1) || i == len - 1) {
|
||||||
val = Ox.formatNumber(num / Math.pow(base, i), i) +
|
val = Ox.formatNumber(num / Math.pow(base, i), i ? i - 1 : 0) +
|
||||||
' ' + chr + (chr && bin ? 'i' : '') + str;
|
' ' + chr + (chr && bin ? 'i' : '') + str;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue