36 lines
1.0 KiB
Java
36 lines
1.0 KiB
Java
package io.gitlab.jfronny.quickmeth;
|
|
|
|
import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
|
|
import me.sargunvohra.mcmods.autoconfig1u.serializer.JanksonConfigSerializer;
|
|
import net.fabricmc.api.ModInitializer;
|
|
import net.minecraft.util.math.MathHelper;
|
|
|
|
public class quickmeth implements ModInitializer {
|
|
public static Cfg cfg;
|
|
static {
|
|
AutoConfig.register(Cfg.class, JanksonConfigSerializer::new);
|
|
cfg = AutoConfig.getConfigHolder(Cfg.class).getConfig();
|
|
}
|
|
|
|
@Override
|
|
public void onInitialize() {
|
|
|
|
}
|
|
|
|
public static double BoxedInvert(double min, double max, double value) {
|
|
return max - value + min;
|
|
}
|
|
|
|
public static double BoxedInvert(double value) {
|
|
return BoxedInvert(MathHelper.floor(value), MathHelper.ceil(value), value);
|
|
}
|
|
|
|
public static float BoxedInvert(float min, float max, float value) {
|
|
return max - value + min;
|
|
}
|
|
|
|
public static float BoxedInvert(float value) {
|
|
return BoxedInvert(MathHelper.floor(value), MathHelper.ceil(value), value);
|
|
}
|
|
}
|