Remove useless math methods

This commit is contained in:
themode 2020-09-16 01:33:37 +02:00
parent 7ccd40d0f7
commit 18c7a61f89
2 changed files with 1 additions and 13 deletions

View File

@ -24,7 +24,7 @@ public class DoNothingGoal extends GoalSelector {
public DoNothingGoal(EntityCreature entityCreature, long time, float chance) {
super(entityCreature);
this.time = time;
this.chance = MathUtils.setBetween(chance, 0, 1);
this.chance = MathUtils.clampFloat(chance, 0, 1);
}
@Override

View File

@ -59,18 +59,6 @@ public final class MathUtils {
return number >= min && number <= max;
}
public static byte setBetween(byte number, byte min, byte max) {
return number > max ? max : number < min ? min : number;
}
public static int setBetween(int number, int min, int max) {
return number > max ? max : Math.max(number, min);
}
public static float setBetween(float number, float min, float max) {
return number > max ? max : Math.max(number, min);
}
public static int clamp(int value, int min, int max) {
if (value < min) {
return min;