Closed odelcroi closed 2 years ago
Everything looks great, thank you for your PR. I made roundit a service instead of a util because i think it fulfills a business rule. Tell me if your ok with that. If so i will merge to the main branch.
Thanks david for your review, I wouldn't say it fullfills a business rule as it is quite generic to the rest of the project. I could have used an external library to round our results to the less significant figures but I didn't find one. I'd prefer to keep roundit considered as a util class, I mean we can replace it in the future without changing the business logic of the project.
Ok I agree. I'll put it back into an util class and merge the PR.
adding units to impact results as stated in #43
round impacts results to the most appropriate significant figures number as stated in #43 : it is defined by the input values from the user and the values from Boavizta database
device.impact_***() -> (float, int): now returns a raw result without rounding and a precision number to round it if needed. It allows to use the raw result for more calculation