mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
Added volume of a pyramid frustum (#7291)
* Added volume of a pyramid frustum Added a function calculating volume of a pyramid frustum, V=(S1+S2+sqrt(S1*S2))*h/3 * compiler error fixed * Added pyramid frustum test case * extra space removed
This commit is contained in:
@@ -35,5 +35,8 @@ public class VolumeTest {
|
||||
|
||||
/* test frustum */
|
||||
assertEquals(359.188760060433, Volume.volumeFrustumOfCone(3, 5, 7));
|
||||
|
||||
/* test pyramid frustum */
|
||||
assertEquals(140.0, Volume.volumeFrustumOfPyramid(6, 24, 10));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user