feat: added math/area.cpp (#1771)

* feat: added math/area.cpp

* feat: added surface area of sphere, cube and cylinder

* docs: modified @brief

* feat: changed to template functions

* test: added 2 test cases for square_area()

* test: added 3rd test case

* [test/docs] added more test cases and docs for them

* docs: added @details

* updating DIRECTORY.md

* fix: changed from math.h to cmath

Co-authored-by: David Leal <halfpacho@gmail.com>

* feat: added algorithms to the math namespace

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: call functions from the math namespace for testing

* fix: style indentation

Co-authored-by: David Leal <halfpacho@gmail.com>

* fix: style indentation

Co-authored-by: David Leal <halfpacho@gmail.com>

* feat: uses uint16_t instead of int for testing

* docs: added comments for testing variables

* fix: style guide

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
Focus
2021-10-24 14:22:40 -04:00
committed by GitHub
parent f821fae698
commit f3b59d173b
2 changed files with 275 additions and 0 deletions

View File

@@ -165,6 +165,7 @@
* [Vector Ops](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/machine_learning/vector_ops.hpp)
## Math
* [Area](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/area.cpp)
* [Armstrong Number](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/armstrong_number.cpp)
* [Binary Exponent](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/binary_exponent.cpp)
* [Binomial Calculate](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/math/binomial_calculate.cpp)