Skip to content

Commit 36c5af4

Browse files
committed
Rounding of fuel quantities
1 parent b9172ad commit 36c5af4

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/rules/fuel_refilled.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ export default class FuelRefilled implements Rule {
4545
10,
4646
)
4747

48+
const current = Math.round(data.fuelQuantity.Pounds)
49+
const prev = Math.round(previousData.fuelQuantity.Pounds)
50+
4851
if (violated) {
49-
return [
50-
`Fuel Refilled: Current: ${data.fuelQuantity.Pounds}, previous=${previousData.fuelQuantity.Pounds}`,
51-
]
52+
return [`Fuel Refilled: Current: ${current}, previous=${prev}`]
5253
}
5354
}
5455
}

0 commit comments

Comments
 (0)