Record Class ScaledInterpolation
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.interpolation.ScaledInterpolation
- All Implemented Interfaces:
Interpolation, RefOptimizer<Interpolation>, net.minecraft.util.EasingType
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.util.EasingType
net.minecraft.util.EasingType.CubicBezier, net.minecraft.util.EasingType.CubicBezierControls -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ScaledInterpolationstatic final ScaledInterpolationstatic final ScaledInterpolationstatic final CustomRegistryType<io.netty.buffer.ByteBuf, Interpolation> Fields inherited from interface net.minecraft.util.EasingType
CONSTANT, IN_BACK, IN_BOUNCE, IN_CIRC, IN_CUBIC, IN_ELASTIC, IN_EXPO, IN_OUT_BACK, IN_OUT_BOUNCE, IN_OUT_CIRC, IN_OUT_CUBIC, IN_OUT_ELASTIC, IN_OUT_EXPO, IN_OUT_QUAD, IN_OUT_QUART, IN_OUT_QUINT, IN_OUT_SINE, IN_QUAD, IN_QUART, IN_QUINT, IN_SINE, OUT_BACK, OUT_BOUNCE, OUT_CIRC, OUT_CUBIC, OUT_ELASTIC, OUT_EXPO, OUT_QUAD, OUT_QUART, OUT_QUINT, OUT_SINE, SIMPLE_REGISTRYFields inherited from interface Interpolation
CODEC, DATA_TYPE, REGISTRY, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionScaledInterpolation(float scale) Creates an instance of aScaledInterpolationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleinterpolate(double t) floatinterpolate(float t) static ScaledInterpolationof(float value) floatscale()Returns the value of thescalerecord component.@NotNull StringtoString()Returns a string representation of this record class.CustomRegistryType<io.netty.buffer.ByteBuf, Interpolation> type()Methods inherited from interface Interpolation
apply, interpolate, interpolate, interpolate, interpolate, interpolateClamped, interpolateClamped, interpolateMirrored, interpolateMirrored, isLinearMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
LINEAR
-
HALF
-
DOUBLE
-
TYPE
-
-
Constructor Details
-
ScaledInterpolation
public ScaledInterpolation(float scale) Creates an instance of aScaledInterpolationrecord class.- Parameters:
scale- the value for thescalerecord component
-
-
Method Details
-
of
-
type
- Specified by:
typein interfaceInterpolation
-
interpolate
public double interpolate(double t) - Specified by:
interpolatein interfaceInterpolation
-
interpolate
public float interpolate(float t) - Specified by:
interpolatein interfaceInterpolation
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-