mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
@@ -135,7 +135,8 @@ public class Area {
|
||||
* @param height height of trapezium
|
||||
* @return area of given trapezium
|
||||
*/
|
||||
public static double surfaceAreaTrapezium(final double base1, final double base2, final double height) {
|
||||
public static double surfaceAreaTrapezium(
|
||||
final double base1, final double base2, final double height) {
|
||||
if (base1 <= 0) {
|
||||
throw new IllegalArgumentException(POSITIVE_BASE + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user