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
4 changes: 2 additions & 2 deletions src/main/java/com/thealgorithms/maths/Area.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ public static double surfaceAreaSphere(final double radius) {
*/
public static double surfaceAreaPyramid(final double sideLength, final double slantHeight) {
if (sideLength <= 0) {
throw new IllegalArgumentException("");
throw new IllegalArgumentException("Must be a positive sideLength");
}
if (slantHeight <= 0) {
throw new IllegalArgumentException("slant height must be greater than 0");
throw new IllegalArgumentException("Must be a positive slantHeight");
}
double baseArea = sideLength * sideLength;
double lateralSurfaceArea = 2 * sideLength * slantHeight;
Expand Down
Loading