Record Class InterpolatedFloat
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.math.InterpolatedFloat
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DataType<InterpolatedFloat> static final InterpolatedFloat -
Constructor Summary
ConstructorsConstructorDescriptionInterpolatedFloat(long start, long end, float from, float to) Creates an instance of aInterpolatedFloatrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongend()Returns the value of theendrecord component.final booleanIndicates whether some other object is "equal to" this one.floatfrom()Returns the value of thefromrecord component.floatget(long now, float delta) final inthashCode()Returns a hash code value for this object.longstart()Returns the value of thestartrecord component.floatto()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
DATA_TYPE
-
-
Constructor Details
-
InterpolatedFloat
public InterpolatedFloat(long start, long end, float from, float to) Creates an instance of aInterpolatedFloatrecord class.- Parameters:
start- the value for thestartrecord componentend- the value for theendrecord componentfrom- the value for thefromrecord componentto- the value for thetorecord component
-
-
Method Details
-
get
public float get(long now, float delta) -
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. -
start
public long start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
end
public long end()Returns the value of theendrecord component.- Returns:
- the value of the
endrecord component
-
from
public float from()Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
public float to()Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-