Record Class FollowerEnvelope.YawRange
java.lang.Object
java.lang.Record
ac.boar.anticheat.prediction.vehicle.FollowerEnvelope.YawRange
- Enclosing class:
FollowerEnvelope
A range of yaws in degrees. lo and hi are not wrapped, so hi - lo is the width. A yaw y is inside when wrap(y - lo) is between 0 and the width.
full = every yaw. It is used when the range would be 180 degrees or wider: the client always turns the short way, so its blend of two yaws that far
apart is no longer between them.
-
Constructor Summary
ConstructorsConstructorDescriptionYawRange(float lo, float hi, boolean full) Creates an instance of aYawRangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanfull()Returns the value of thefullrecord component.final inthashCode()Returns a hash code value for this object.floathi()Returns the value of thehirecord component.hull(FollowerEnvelope.YawRange other) floatlo()Returns the value of thelorecord component.mix(FollowerEnvelope.YawRange other, float w) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
YawRange
public YawRange(float lo, float hi, boolean full) Creates an instance of aYawRangerecord class.- Parameters:
lo- the value for thelorecord componenthi- the value for thehirecord componentfull- the value for thefullrecord component
-
-
Method Details
-
hull
-
mix
-
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 '=='. -
lo
public float lo()Returns the value of thelorecord component.- Returns:
- the value of the
lorecord component
-
hi
public float hi()Returns the value of thehirecord component.- Returns:
- the value of the
hirecord component
-
full
public boolean full()Returns the value of thefullrecord component.- Returns:
- the value of the
fullrecord component
-