Change ConstantRage check to only check if greater than

This commit is contained in:
Zoë Gidiere
2025-10-03 17:11:01 -06:00
parent 84a6cd0c26
commit fd3d1ce830

View File

@@ -18,7 +18,7 @@ public class ConstantRange implements Range {
private int max;
public ConstantRange(int min, int max) {
if(min >= max) throw new IllegalArgumentException("Minimum must not be greater than or equal to maximum!");
if(min > max) throw new IllegalArgumentException("Minimum must not be greater than maximum!");
this.max = max;
this.min = min;
}