-
Notifications
You must be signed in to change notification settings - Fork 20k
Herons : Changed the signature of the function #4686
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
Conversation
closes #4685 |
5f4f5d5
to
2df4690
Compare
Fixes #4685. |
22724b5
to
86f96c4
Compare
Made the requested changes, I request the Reviewer(s) to please tag this as hacktoberfest-accepted. |
5840c3e
to
383146b
Compare
This is not needed, since this repository has |
@satyabarghav there was a subtle error in the check if all of the provided sidelights are positive, namely, the tests: Assertions.assertThrows(IllegalArgumentException.class, () -> { HeronsFormula.herons(1, 1, 0); });
Assertions.assertThrows(IllegalArgumentException.class, () -> { HeronsFormula.herons(1, 0, 1); });
Assertions.assertThrows(IllegalArgumentException.class, () -> { HeronsFormula.herons(0, 1, 1); }); did not pass. Always add tests. To speed up the whole process I allowed myself to push a commit into your branch - I hope you do not mind. |
Cool, thanks for being with me :D |
I have already raised this issue here
The required changes were made to make it work with even larger set of data types like double and float and further documentation was also added ro ease the readability and understandability of the code.