Clamp to the ends so it's easier to reach the max/min on the slider.

This commit is contained in:
Sollace 2019-08-01 22:32:41 +02:00
parent b45a2a9788
commit fc734c2334

View file

@ -40,6 +40,14 @@ public class PonyConfig extends JsonConfig {
}
public float setGlobalScaleFactor(float f) {
if (f < 0.15F) {
f = 0.1F;
}
if (f > 2.95) {
f = 3;
}
f = Math.round(MathHelper.clamp(f, 0.1F, 3) * 100) / 100F;
scaleFactor.set(f);