Record Class BounceGravityCorrection
java.lang.Object
java.lang.Record
ac.boar.anticheat.prediction.engine.data.BounceGravityCorrection
-
Constructor Summary
ConstructorsConstructorDescriptionBounceGravityCorrection(float requestedY, float actualY) Creates an instance of aBounceGravityCorrectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatactualY()Returns the value of theactualYrecord component.static floatapplyGravity(float velocityY, float gravity, BounceGravityCorrection request) final booleanIndicates whether some other object is "equal to" this one.static BounceGravityCorrectionfromMove(float restitutionY, float requestedY, float actualY) final inthashCode()Returns a hash code value for this object.floatReturns the value of therequestedYrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BounceGravityCorrection
public BounceGravityCorrection(float requestedY, float actualY) Creates an instance of aBounceGravityCorrectionrecord class.- Parameters:
requestedY- the value for therequestedYrecord componentactualY- the value for theactualYrecord component
-
-
Method Details
-
fromMove
-
applyGravity
-
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 '=='. -
requestedY
public float requestedY()Returns the value of therequestedYrecord component.- Returns:
- the value of the
requestedYrecord component
-
actualY
public float actualY()Returns the value of theactualYrecord component.- Returns:
- the value of the
actualYrecord component
-