Inspectopedia
 
2024.3

Constant call to 'Math'

Warning
New
Last modified: 03 December 2024

Reports calls to java.lang.Math or java.lang.StrictMath methods that can be replaced with simple compile-time constants.

Example:

double v = Math.sin(0.0);

After the quick-fix is applied:

double v = 0.0;