Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/main/java/com/thealgorithms/maths/Volume.java
Copy link
Member

Choose a reason for hiding this comment

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

please fix the failing build and clang format worklfow @DEVANSH-GAJJAR

Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,19 @@ public static double volumePyramid(double baseArea, double height) {
public static double volumeFrustumOfCone(double r1, double r2, double height) {
return (Math.PI * height / 3) * (r1 * r1 + r2 * r2 + r1 * r2);
}

/**
Copy link
Member

Choose a reason for hiding this comment

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

This line is not indented correctly (compare with other methods)

* Calculate the volume of a triangular prism.
*
* @param base base of the triangle
* @param height height of the triangle
* @param length length of the prism
* @return volume of the triangular prism
*/
public static double volumeTriangularPrism(double base, double height, double length) {
return 0.5 * base * height * length;
}



}
Loading