Skip to content
Snippets Groups Projects
Commit bb9c9927 authored by Tom French's avatar Tom French Committed by James Long
Browse files

fix: use Math.round in place of truncating digits

parent 696a0943
No related branches found
No related tags found
No related merge requests found
......@@ -199,5 +199,5 @@ export function makeValue(value, cond) {
}
export function getApproxNumberThreshold(number) {
return (Math.abs(number) * 0.075) | 0;
return Math.round(Math.abs(number) * 0.075);
}
......@@ -221,7 +221,7 @@ export function extractScheduleConds(conditions) {
export function getScheduledAmount(amount) {
if (amount && typeof amount !== 'number') {
return ((amount.num1 + amount.num2) / 2) | 0;
return Math.round((amount.num1 + amount.num2) / 2);
}
return amount;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment