Shreyas-BalajiN opened a new pull request, #129:
URL: https://github.com/apache/commons-numbers/pull/129
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]