Record Class EvalSpring
java.lang.Object
java.lang.Record
cromveil.combatnumbers.client.animation.eval.EvalSpring
- All Implemented Interfaces:
Eval
-
Constructor Summary
ConstructorsConstructorDescriptionEvalSpring(float[] resolvedStarts, float to, float velocity, float stiffness, float damping, float mass, int durationMs) Creates an instance of aEvalSpringrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatdamping()Returns the value of thedampingrecord component.intReturns the value of thedurationMsrecord component.floatendValue(int charIdx) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatmass()Returns the value of themassrecord component.float[]Returns the value of theresolvedStartsrecord component.floatsample(int charIdx, float t) floatReturns the value of thestiffnessrecord component.floatto()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.floatvelocity()Returns the value of thevelocityrecord component.
-
Constructor Details
-
EvalSpring
public EvalSpring(float[] resolvedStarts, float to, float velocity, float stiffness, float damping, float mass, int durationMs) Creates an instance of aEvalSpringrecord class.- Parameters:
resolvedStarts- the value for theresolvedStartsrecord componentto- the value for thetorecord componentvelocity- the value for thevelocityrecord componentstiffness- the value for thestiffnessrecord componentdamping- the value for thedampingrecord componentmass- the value for themassrecord componentdurationMs- the value for thedurationMsrecord component
-
-
Method Details
-
sample
-
endValue
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
resolvedStarts
public float[] resolvedStarts()Returns the value of theresolvedStartsrecord component.- Returns:
- the value of the
resolvedStartsrecord component
-
to
public float to()Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-
velocity
public float velocity()Returns the value of thevelocityrecord component.- Returns:
- the value of the
velocityrecord component
-
stiffness
public float stiffness()Returns the value of thestiffnessrecord component.- Returns:
- the value of the
stiffnessrecord component
-
damping
public float damping()Returns the value of thedampingrecord component.- Returns:
- the value of the
dampingrecord component
-
mass
public float mass()Returns the value of themassrecord component.- Returns:
- the value of the
massrecord component
-
durationMs
public int durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the
durationMsrecord component
-