Inspectopedia
 
2024.3

Integer division in floating-point context

Warning
New
Last modified: 03 December 2024

Reports integer divisions where the result is used as a floating-point number. Such division is often an error and may have unexpected results due to the truncation that happens in integer division.

Example:

After the quick-fix is applied: