You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Pythagorean Theorem was one of the earliest theorems known to ancient civilizations.
This famous theorem is named for the Greek mathematician and philosopher, Pythagoras.
I've created a Java application that solves the length for any side given that the user has the other two.
Motivation
This project began shortly after I had learned about the Pythagorean Theorem in my math class.
Everyday I would get more and more ideas of how to make it better, until it turned into what it is now.
I have learned so much about Java by working on this project and I'm super excited to see what other things can be added to it.
Code Example
The source code can be downloaded from the project page at GitHub.
The program is based on a simple equation: double legA = Double.parseDouble(textField.getText()); double legB = Double.parseDouble(textField_1.getText()); double hypoC = Math.sqrt(Math.pow(legA, 2) + Math.pow(legB, 2)); NumberFormat nf = NumberFormat.getNumberInstance(); textField_2.setText(nf.format(hypoC));
Contributing
Reporting issues
Please read the following guidelines before opening any issue:
Search for existing issues. Someone else might have already reported the issue you are having and a fix has been made or is being worked on.
Be as clear as possible when reporting an issue. It is hard to fix an issue if we don't know what the issue is being described, maybe include a demo of the issue
Don't constantly ask if the issue you opened has been fixed. It only slows the fixing process down if you're constantly asking if the problem has been fixed yet. We'll let you know when it has been fixed.
Pull requests
Pull requests are always welcome. Before adding new features, it's probably a good idea to open an issue first and discuss it.
Pull request guidelines:
Follow the coding style used in the Pythagorean Theorem Solver.
Keep your patches small and simple.
Use a topic branch and open the pull request against the master branch.
Installation
Download and installation are simple.
Go here to download the file, wait for five seconds to go by then click the "Skip Ad" button in the top right corner.
To run it you must have Java Runtime Environment installed.
Open the file and enjoy!