Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings team,
Thank you in advance for looking into this pull request.
I have refactored some changes to reduce some code smells
The changes are as follows
1)Angles.java
Pushed down variable: The variable TWO_PI was being used by Turn and Rad child classes of Angle parent class but Deg child
class was not using it so I pushed down the variable to both child classes, I also searched for all references to it and changed
accordingly.
2)ErfPerformance.java
Pulled up variable: Non uniform and Non uniform inverse string was being used by all sub classes so I pulled it up to the
parent class FunctionData
3)Primes.java
Renamed variable: changed the variable name from rem to remainder for better understanding
Added Explaining variable: There was a magic number 2 which was being returned I added an explaining variable called
FIRST_PRIME
Decomposed conditional: There was a conditional logic which was making the number n not a multiple of 3, I made it a
separate function for better understanding
None of the changes are causing any check style violation and maven build and maven test are also resulting in build success.
Thank you for this opportunity.