mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-28 02:48:14 -05:00
Update #48 - Added some features from OptiFine
This commit is contained in:
27
sources/main/java/net/optifine/config/RangeInt.java
Normal file
27
sources/main/java/net/optifine/config/RangeInt.java
Normal file
@ -0,0 +1,27 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user