Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enh: remove unnecessary integer conversions
round() produces an integer already, if no explicit number of decimal places passed as 2nd parameter. Wrapping it into another int() is hence unnecessary. Arithmetic operations with non-numeric/invalid values produce meaningful error messages. Wrapping input values into int() before dividing or multiplying them, is hence unnecessary. Manually entered floats in UI input and config file are then mathematically correctly rounded, which however cannot cause a value drift in save/read cycles, since on both ends, the float is converted into an integer directly. Signed-off-by: MichaIng <[email protected]>
- Loading branch information