Skip to content

Commit edc5e1c

Browse files
committed
Redo
1 parent 47678f0 commit edc5e1c

File tree

1 file changed

+0
-19
lines changed
  • src/main/java/com/thealgorithms/maths

1 file changed

+0
-19
lines changed

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -192,23 +192,4 @@ public static double surfaceAreaCone(final double radius, final double height) {
192192
}
193193
return Math.PI * radius * (radius + Math.pow(height * height + radius * radius, 0.5));
194194
}
195-
196-
/**
197-
* Calculate the surface area of a pyramid with a square base.
198-
*
199-
* @param sideLength side length of the square base
200-
* @param slantHeight slant height of the pyramid
201-
* @return surface area of the given pyramid
202-
*/
203-
public static double surfaceAreaPyramid(final double sideLength, final double slantHeight) {
204-
if (sideLength <= 0) {
205-
throw new IllegalArgumentException("Must be a positive sideLength");
206-
}
207-
if (slantHeight <= 0) {
208-
throw new IllegalArgumentException("Must be a positive slantHeight");
209-
}
210-
double baseArea = sideLength * sideLength;
211-
double lateralSurfaceArea = 2 * sideLength * slantHeight;
212-
return baseArea + lateralSurfaceArea;
213-
}
214195
}

0 commit comments

Comments
 (0)