style: enable ParameterName in CheckStyle. (#5196)

* Enabled: ParameterName in CheckStyle.

* Refactored to fix  bug caused by selfAssignment of variables in VectorCrossproduct class
This commit is contained in:
Godwill Christopher
2024-05-31 14:01:11 -06:00
committed by GitHub
parent 2568b96784
commit c42b1c940c
23 changed files with 139 additions and 139 deletions

View File

@ -27,15 +27,15 @@ public class BinaryExponentiation {
}
// iterative function to calculate a to the power of b
long power(long N, long M) {
long power = N;
long power(long n, long m) {
long power = n;
long sum = 1;
while (M > 0) {
if ((M & 1) == 1) {
while (m > 0) {
if ((m & 1) == 1) {
sum *= power;
}
power = power * power;
M = M >> 1;
m = m >> 1;
}
return sum;
}