mirror of
https://gitflic.ru/project/lax1dude/eaglercraft-1_8.git
synced 2025-07-21 04:51:14 -09: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;
|
|
}
|
|
}
|