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

fix:Fit Binominal calculate.cpp to guidelines #2464

Closed
wants to merge 12 commits into from

Conversation

ewd00010
Copy link
Contributor

Description of Change

FIX: altered the structure of if else if statements to have guard clauses first before main functionality, added brackets to make calculation steps more clear (Following BODMAS), updated namespaces used in file, removed unneeded user input code

CHORE: Added explanations and other documentation

Checklist

  • Added description of change
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • I acknowledge that all my contributions will be made under the project's license.

Notes: still no clangd working for me, file may need checked
I'm pretty sure I could do a recursive version of this code, should I make one and add it as a function to this file?

FIX: altered the structure of if else if statements to have guard clauses first before main functionality, added brackets to make calculation steps more clear (Following BODMAS), updated namespaces used in file, removed unneeded user input code
CHORE: Added explanations and other documentation
@ewd00010
Copy link
Contributor Author

maybe we should change the file name to just be binominal_coefficient.cpp aswell

math/binomial_calculate.cpp Outdated Show resolved Hide resolved
math/binomial_calculate.cpp Outdated Show resolved Hide resolved
math/binomial_calculate.cpp Outdated Show resolved Hide resolved
math/binomial_calculate.cpp Outdated Show resolved Hide resolved
math/binomial_calculate.cpp Outdated Show resolved Hide resolved
math/binomial_calculate.cpp Outdated Show resolved Hide resolved
math/binomial_calculate.cpp Outdated Show resolved Hide resolved
ewd00010 and others added 5 commits May 23, 2023 17:46
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
@realstealthninja
Copy link
Collaborator

part of #2456.

@Panquesito7 Panquesito7 added the bugfix Correction to existing algorithms label May 30, 2023
@Panquesito7 Panquesito7 added Improvement improvement in previously written codes and removed bugfix Correction to existing algorithms labels May 31, 2023
@ewd00010 ewd00010 requested a review from tjgurwara99 as a code owner June 3, 2023 14:07
I thought to do this before but forgot to actually do it, whoops!
Co-authored-by: David Leal <halfpacho@gmail.com>
* @namespace binomial
* @brief Functions for [Binomial
* coefficients](https://en.wikipedia.org/wiki/Binomial_coefficient)
* implementation
*/
namespace binomial {
namespace math { namespace binomial {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be documented as well

* @namespace binomial
* @brief Functions for [Binomial
* coefficients](https://en.wikipedia.org/wiki/Binomial_coefficient)
* implementation
*/
namespace binomial {
namespace math { namespace binomial {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace math { namespace binomial {
namespace math {
namespace binomial {

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2023

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Aug 5, 2023
@github-actions
Copy link
Contributor

Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

@github-actions github-actions bot closed this Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement improvement in previously written codes stale Author has not responded to the comments for over 2 weeks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants