mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-02 16:05:29 +00:00
fix range bounds check
This commit is contained in:
parent
da28244f81
commit
ef1f1c0af0
@ -19,7 +19,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 maximum!");
|
||||
if(min >= max) throw new IllegalArgumentException("Minimum must not be greater than or equal to maximum!");
|
||||
this.max = max;
|
||||
this.min = min;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user