Record Class FixedInterpolation
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.interpolation.FixedInterpolation
- All Implemented Interfaces:
Interpolation
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FixedInterpolationstatic final FixedInterpolationstatic final FixedInterpolationstatic final CustomRegistryType<io.netty.buffer.ByteBuf, Interpolation> Fields inherited from interface Interpolation
CODEC, DATA_TYPE, REGISTRY, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionFixedInterpolation(float value) Creates an instance of aFixedInterpolationrecord 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) booleanisLinear()static FixedInterpolationof(float value) @NotNull StringtoString()Returns a string representation of this record class.CustomRegistryType<io.netty.buffer.ByteBuf, Interpolation> type()floatvalue()Returns the value of thevaluerecord component.Methods inherited from interface Interpolation
composite, flipX, flipY, interpolate, interpolate, interpolate, interpolate, interpolateClamped, interpolateClamped, interpolateMirrored, interpolateMirrored, inverse, join
-
Field Details
-
MIN
-
MAX
-
MIDDLE
-
TYPE
-
-
Constructor Details
-
FixedInterpolation
public FixedInterpolation(float value) Creates an instance of aFixedInterpolationrecord class.- Parameters:
value- the value for thevaluerecord 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
-
isLinear
public boolean isLinear()- Specified by:
isLinearin interfaceInterpolation
-
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. -
value
public float value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-