Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored IntegerDivider.java divide method #644

Open
wants to merge 1 commit into
base: uinverse
Choose a base branch
from

Commits on May 13, 2023

  1. Refactored IntegerDivider.java divide method

    Refactored the divide method in IntegerDivider.java to use build-in IntToDoubleConverter.Convert instead of the previous duplicated explicit casting, this removes duplicated code and makes the application easier to change.
    
    Refactored the if - else if statement into a ternary operator, this reduces state in the application and makes the application less bugprone and more maintainable, note dbRoundedQuotient is now a final variable, instead of a mutable variable.
    
    Added a TODO on how to further improve this implementation to make the application even more maintainable, flexible, and extendable.
    mrrosenkilde2 authored May 13, 2023
    Configuration menu
    Copy the full SHA
    6e6c71d View commit details
    Browse the repository at this point in the history