/* * Decompiled with CFR 0.152. * * Could not load the following classes: * it.unimi.dsi.fastutil.floats.Float2FloatFunction */ package net.minecraft.util; import it.unimi.dsi.fastutil.floats.Float2FloatFunction; import java.util.function.Function; public interface BoundedFloatFunction { public static final BoundedFloatFunction IDENTITY = BoundedFloatFunction.createUnlimited(input -> input); public float apply(C var1); public float minValue(); public float maxValue(); public static BoundedFloatFunction createUnlimited(final Float2FloatFunction function) { return new BoundedFloatFunction(){ @Override public float apply(Float aFloat) { return ((Float)function.apply((Object)aFloat)).floatValue(); } @Override public float minValue() { return Float.NEGATIVE_INFINITY; } @Override public float maxValue() { return Float.POSITIVE_INFINITY; } }; } default public BoundedFloatFunction comap(final Function function) { final BoundedFloatFunction outer = this; return new BoundedFloatFunction(this){ @Override public float apply(C2 c2) { return outer.apply(function.apply(c2)); } @Override public float minValue() { return outer.minValue(); } @Override public float maxValue() { return outer.maxValue(); } }; } }