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

@@ -17,14 +17,14 @@ public final class PronicNumber {
/**
* This method checks if the given number is pronic number or non-pronic number
*
* @param input_number Integer value which is to be checked if is a pronic number or not
* @param inputNumber Integer value which is to be checked if is a pronic number or not
* @return true if input number is a pronic number, false otherwise
*/
static boolean isPronic(int input_number) {
static boolean isPronic(int inputNumber) {
// Iterating from 0 to input_number
for (int i = 0; i <= input_number; i++) {
for (int i = 0; i <= inputNumber; i++) {
// Checking if product of i and (i+1) is equals input_number
if (i * (i + 1) == input_number && i != input_number) {
if (i * (i + 1) == inputNumber && i != inputNumber) {
// return true if product of i and (i+1) is equals input_number
return true;
}