allow negative frequencies in exponential display, closes #247
This commit is contained in:
parent
0258a75650
commit
c46b3275a9
@ -38,7 +38,7 @@ $.fn.exponentialInput = function() {
|
|||||||
// calculate initial exponent
|
// calculate initial exponent
|
||||||
var value = parseFloat($input.val());
|
var value = parseFloat($input.val());
|
||||||
if (!Number.isNaN(value)) {
|
if (!Number.isNaN(value)) {
|
||||||
$exponent.val(Math.floor(Math.log10(value) / 3) * 3);
|
$exponent.val(Math.floor(Math.log10(Math.abs(value)) / 3) * 3);
|
||||||
setExponent();
|
setExponent();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user