类 InterpHelper
java.lang.Object
committee.nova.mods.avaritia.api.util.math.InterpHelper
Name: Avaritia-forge / InterpHelper
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明floatinterpolate(float q0, float q1, float q2, float q3) Interpolates using the already computed coefficients.voidlocate(float x, float y) Computes the coefficients for the interpolation.voidreset(float dx0, float dy0, float dx1, float dy1, float dx2, float dy2, float dx3, float dy3) Resets the interp helper with the given quad.voidsetup()Call when you are ready to use the InterpHelper.
-
构造器详细资料
-
InterpHelper
public InterpHelper()
-
-
方法详细资料
-
reset
public void reset(float dx0, float dy0, float dx1, float dy1, float dx2, float dy2, float dx3, float dy3) Resets the interp helper with the given quad. Does not care what order the vertices are in. -
setup
public void setup()Call when you are ready to use the InterpHelper. -
locate
public void locate(float x, float y) Computes the coefficients for the interpolation.- 参数:
x- X interp location.y- Y interp location.
-
interpolate
public float interpolate(float q0, float q1, float q2, float q3) Interpolates using the already computed coefficients.- 参数:
q0- Value at dx0 dy0q1- Value at dx1 dy1q2- Value at dx2 dy2q3- Value at dx3 dy3- 返回:
- The result.
-