Package dev.latvian.mods.klib.math
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
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 with '=='. -
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
-