mirror of
http://git.eaglercraft.rip/eaglercraft/eaglercraft-1.8.git
synced 2025-04-30 02:01:59 -05:00
28 lines
467 B
Java
28 lines
467 B
Java
package net.optifine.config;
|
|
|
|
public class RangeInt {
|
|
private int min;
|
|
private int max;
|
|
|
|
public RangeInt(int min, int max) {
|
|
this.min = Math.min(min, max);
|
|
this.max = Math.max(min, max);
|
|
}
|
|
|
|
public boolean isInRange(int val) {
|
|
return val < this.min ? false : val <= this.max;
|
|
}
|
|
|
|
public int getMin() {
|
|
return this.min;
|
|
}
|
|
|
|
public int getMax() {
|
|
return this.max;
|
|
}
|
|
|
|
public String toString() {
|
|
return "min: " + this.min + ", max: " + this.max;
|
|
}
|
|
}
|