Open Cossid opened 1 week ago
Avoid integer precision loss in denominator of battery calculation while remaining within uint16_t size constraints.
This keeps the entire calculation within uint16_t constraints while not causing an integer rounding in the denominator.
Fixes #524
Feel free to reject this if you feel this is too hacky, as I understand it makes it less clear at the expense of being more technically correct.
Avoid integer precision loss in denominator of battery calculation while remaining within uint16_t size constraints.
This keeps the entire calculation within uint16_t constraints while not causing an integer rounding in the denominator.
Fixes #524
Feel free to reject this if you feel this is too hacky, as I understand it makes it less clear at the expense of being more technically correct.