Skip to content

Commit dfb11e0

Browse files
authored
Update Volume.java
1 parent 9f78d1f commit dfb11e0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/com/thealgorithms/maths/Volume.java

+10
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,14 @@ public static double volumePrism(double basearea, double height) {
8888
public static double volumePyramid(double basearea, double height) {
8989
return (basearea * height) / 3;
9090
}
91+
92+
/**
93+
* Calculate the volume of an ellipsoid.
94+
*
95+
* @param semi-axes of an ellipsoid.
96+
* @return volume of given ellipsoid.
97+
*/
98+
private static double volumeEllipsoid(double x, double y, , double z) {
99+
return (Math.PI * x * y * z )/(6 * Math.sqrt(2));
100+
}
91101
}

0 commit comments

Comments
 (0)