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