diff --git a/d3/dfe/perimeter_8cpp.html b/d3/dfe/perimeter_8cpp.html new file mode 100644 index 000000000..6824a33ae --- /dev/null +++ b/d3/dfe/perimeter_8cpp.html @@ -0,0 +1,411 @@ + + +
+ + + + +|
+ Algorithms_in_C++ 1.0.0
+
+ Set of algorithms implemented in C++.
+ |
+
Implementations for the perimeter of various shapes. +More...
+#include <cassert>#include <cmath>#include <cstdint>#include <iostream>+Namespaces | |
| namespace | math |
| for std::rand | |
+Functions | |
| template<typename T > | |
| T | math::square_perimeter (T length) |
| perimeter of a square (4 * l) More... | |
| template<typename T > | |
| T | math::rect_perimeter (T length, T width) |
| perimeter of a rectangle ( 2(l + w) ) More... | |
| template<typename T > | |
| T | math::triangle_perimeter (T base, T height, T hypotenuse) |
| perimeter of a triangle (a + b + c) More... | |
| template<typename T > | |
| T | math::circle_perimeter (T radius) |
| perimeter of a circle (2 * pi * r) More... | |
| template<typename T > | |
| T | math::parallelogram_perimeter (T base, T height) |
| perimeter of a parallelogram 2(b + h) More... | |
| template<typename T > | |
| T | math::cube_surface_perimeter (T length) |
| surface perimeter of a cube ( 12 More... | |
| template<typename T > | |
| T | math::n_polygon_surface_perimeter (T sides, T length) |
| surface perimeter of a n-polygon ( n * l) More... | |
| template<typename T > | |
| T | math::cylinder_surface_perimeter (T radius, T height) |
| surface perimeter of a cylinder (2 * radius + 2 * height) More... | |
| static void | test () |
| Self-test implementations. More... | |
| int | main () |
| Main function. More... | |
Implementations for the perimeter of various shapes.
+The of a shape is the amount of 2D space it takes up. All shapes have a formula for their perimeter. These implementations support multiple return types.
+ +| int main | +( | +void | +) | ++ |
+
|
+ +static | +
Self-test implementations.
+Mathematical algorithms
for assert for io operations
Mathematical algorithms
+for assert for M_PI definition and pow() for uint16_t datatype
+Mathematical algorithms
Mathematical algorithms
for assert for std::pow for std::uint32_t
Mathematical algorithms
@@ -342,6 +376,38 @@ template<typename T > + +| T math::circle_perimeter | +( | +T | +radius | ) | ++ |
perimeter of a circle (2 * pi * r)
+| radius | is the radius of the circle |
| T math::cube_surface_perimeter | +( | +T | +length | ) | ++ |
surface perimeter of a cube ( 12
+| length | is the length of the cube |
| T math::cylinder_surface_perimeter | +( | +T | +radius, | +
| + | + | T | +height | +
| + | ) | ++ |
surface perimeter of a cylinder (2 * radius + 2 * height)
+| radius | is the radius of the cylinder |
| height | is the height of the cylinder |
| T math::n_polygon_surface_perimeter | +( | +T | +sides, | +
| + | + | T | +length | +
| + | ) | ++ |
surface perimeter of a n-polygon ( n * l)
+| length | is the length of the polygon |
| sides | is the number of sides of the polygon |
| T math::parallelogram_perimeter | +( | +T | +base, | +
| + | + | T | +height | +
| + | ) | ++ |
perimeter of a parallelogram 2(b + h)
+| base | is the length of the bottom side of the parallelogram |
| height | is the length of the tallest point in the parallelogram |
| T math::rect_perimeter | +( | +T | +length, | +
| + | + | T | +width | +
| + | ) | ++ |
perimeter of a rectangle ( 2(l + w) )
+| length | is the length of the rectangle |
| width | is the width of the rectangle |
| T math::square_perimeter | +( | +T | +length | ) | ++ |
perimeter of a square (4 * l)
+| length | is the length of the square |
| T math::triangle_perimeter | +( | +T | +base, | +
| + | + | T | +height, | +
| + | + | T | +hypotenuse | +
| + | ) | ++ |
perimeter of a triangle (a + b + c)
+| base | is the length of the bottom side of the triangle |
| height | is the length of the tallest point in the triangle |