/* * Decompiled with CFR 0.152. */ package net.minecraft.world.attribute; import net.minecraft.util.ARGB; import net.minecraft.util.Mth; public interface LerpFunction { public static LerpFunction ofFloat() { return Mth::lerp; } public static LerpFunction ofDegrees(float maxDelta) { return (alpha, from, to) -> { float delta = Mth.wrapDegrees(to.floatValue() - from.floatValue()); if (Math.abs(delta) >= maxDelta) { return to; } return Float.valueOf(from.floatValue() + alpha * delta); }; } public static LerpFunction ofConstant() { return (alpha, from, to) -> from; } public static LerpFunction ofStep(float threshold) { return (alpha, from, to) -> alpha >= threshold ? to : from; } public static LerpFunction ofColor() { return ARGB::srgbLerp; } public T apply(float var1, T var2, T var3); }