Record Class JoinedInterpolation
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.interpolation.JoinedInterpolation
- All Implemented Interfaces:
Interpolation
public record JoinedInterpolation(Interpolation in, Interpolation out)
extends Record
implements Interpolation
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JoinedInterpolationstatic final JoinedInterpolationstatic final JoinedInterpolationstatic final JoinedInterpolationstatic final InterpolationType<?>[]static final JoinedInterpolationstatic final JoinedInterpolationstatic final com.mojang.serialization.MapCodec<JoinedInterpolation> static final JoinedInterpolationstatic final JoinedInterpolationstatic final JoinedInterpolationstatic final JoinedInterpolationstatic final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, JoinedInterpolation> static final InterpolationType<JoinedInterpolation> Fields inherited from interface dev.latvian.mods.klib.interpolation.Interpolation
CODEC, DATA_TYPE, DIRECT_CODEC, UNIT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aJoinedInterpolationrecord 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.in()Returns the value of theinrecord component.doubleinterpolate(double t) floatinterpolate(float t) static JoinedInterpolationof(Interpolation in, Interpolation out) out()Returns the value of theoutrecord component.@NotNull StringtoString()Returns a string representation of this record class.type()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.latvian.mods.klib.interpolation.Interpolation
interpolate, interpolate, interpolate, interpolate, interpolateClamped, interpolateClamped, interpolateMirrored, interpolateMirrored, inverse, isLinear, join
-
Field Details
-
SINE
-
QUAD
-
CUBIC
-
QUART
-
QUINT
-
EXPO
-
CIRC
-
BACK
-
ELASTIC
-
BOUNCE
-
MAP_CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,JoinedInterpolation> STREAM_CODEC -
EASING
-
TYPE
-
-
Constructor Details
-
JoinedInterpolation
Creates an instance of aJoinedInterpolationrecord class.- Parameters:
in- the value for theinrecord componentout- the value for theoutrecord 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
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 withObjects::equals(Object,Object). -
in
Returns the value of theinrecord component.- Returns:
- the value of the
inrecord component
-
out
Returns the value of theoutrecord component.- Returns:
- the value of the
outrecord component
-