added frequency rounding
This commit is contained in:
parent
8def3f6af6
commit
35e32a32e8
2 changed files with 23 additions and 21 deletions
|
|
@ -102,7 +102,9 @@ export const xen = register('xen', function (scaleNameOrRatios, pat) {
|
|||
hVal = isObject ? hVal : { n: hVal };
|
||||
const { n, value, ...otherValues } = hVal;
|
||||
const scale = getXenScale(scaleNameOrRatios);
|
||||
const frequency = xenOffset(scale, parseNumeral(hVal.n));
|
||||
let frequency = xenOffset(scale, parseNumeral(hVal.n));
|
||||
// 10 is somewhat arbitrary
|
||||
frequency = parseFloat(frequency.toPrecision(10))
|
||||
hap.value = isObject ? {...otherValues, freq: frequency } : frequency
|
||||
return hap;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue