mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-16 02:04:59 +00:00
* wip backport of custom uniforms * Functioning custom uniforms maybe? * Workon separating dynamic/non-dynamic uniforms and making variables available to custom uniforms (currently the JVM dies horribly) * wip * It no longer crashes horrifically * star imports
25 lines
589 B
Java
25 lines
589 B
Java
package kroppeb.stareval.function;
|
|
|
|
import kroppeb.stareval.expression.Expression;
|
|
|
|
@FunctionalInterface
|
|
public interface F2FFunction extends TypedFunction {
|
|
float eval(float a);
|
|
|
|
@Override
|
|
default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) {
|
|
params[0].evaluateTo(context, functionReturn);
|
|
functionReturn.floatReturn = this.eval(functionReturn.floatReturn);
|
|
}
|
|
|
|
@Override
|
|
default Type getReturnType() {
|
|
return Type.Float;
|
|
}
|
|
|
|
@Override
|
|
default Parameter[] getParameters() {
|
|
return new Parameter[]{Type.FloatParameter};
|
|
}
|
|
}
|