]> source.dussan.org Git - sonarqube.git/blob
7143a245802044bd0857dd8da6a485575e089f8a
[sonarqube.git] /
1 <p> This method uses a static method from java.lang.Math on a constant value. This method's
2 result in this case, can be determined statically, and is faster and sometimes more accurate to
3 just use the constant. Methods detected are:
4 </p>
5 <table>
6 <tr>
7    <th>Method</th> <th>Parameter</th>
8 </tr>
9 <tr>
10    <td>abs</td> <td>-any-</td>
11 </tr>
12 <tr>
13    <td>acos</td> <td>0.0 or 1.0</td>
14 </tr>
15 <tr>
16    <td>asin</td> <td>0.0 or 1.0</td>
17 </tr>
18 <tr>
19    <td>atan</td> <td>0.0 or 1.0</td>
20 </tr>
21 <tr>
22    <td>atan2</td> <td>0.0</td>
23 </tr>
24 <tr>
25    <td>cbrt</td> <td>0.0 or 1.0</td>
26 </tr>
27 <tr>
28    <td>ceil</td> <td>-any-</td>
29 </tr>
30 <tr>
31    <td>cos</td> <td>0.0</td>
32 </tr>
33 <tr>
34    <td>cosh</td> <td>0.0</td>
35 </tr>
36 <tr>
37    <td>exp</td> <td>0.0 or 1.0</td>
38 </tr>
39 <tr>
40    <td>expm1</td> <td>0.0</td>
41 </tr>
42 <tr>
43    <td>floor</td> <td>-any-</td>
44 </tr>
45 <tr>
46    <td>log</td> <td>0.0 or 1.0</td>
47 </tr>
48 <tr>
49    <td>log10</td> <td>0.0 or 1.0</td>
50 </tr>
51 <tr>
52    <td>rint</td> <td>-any-</td>
53 </tr>
54 <tr>
55    <td>round</td> <td>-any-</td>
56 </tr>
57 <tr>
58    <td>sin</td> <td>0.0</td>
59 </tr>
60 <tr>
61    <td>sinh</td> <td>0.0</td>
62 </tr>
63 <tr>
64    <td>sqrt</td> <td>0.0 or 1.0</td>
65 </tr>
66 <tr>
67    <td>tan</td> <td>0.0</td>
68 </tr>
69 <tr>
70    <td>tanh</td> <td>0.0</td>
71 </tr>
72 <tr>
73    <td>toDegrees</td> <td>0.0 or 1.0</td>
74 </tr>
75 <tr>
76    <td>toRadians</td> <td>0.0</td>
77 </tr>
78 </table>