Record Class FollowerEnvelope.YawRange

java.lang.Object
java.lang.Record
ac.boar.anticheat.prediction.vehicle.FollowerEnvelope.YawRange
Enclosing class:
FollowerEnvelope

public static record FollowerEnvelope.YawRange(float lo, float hi, boolean full) extends Record
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 Details

    • YawRange

      public YawRange(float lo, float hi, boolean full)
      Creates an instance of a YawRange record class.
      Parameters:
      lo - the value for the lo record component
      hi - the value for the hi record component
      full - the value for the full record component
  • Method Details

    • hull

    • mix

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • lo

      public float lo()
      Returns the value of the lo record component.
      Returns:
      the value of the lo record component
    • hi

      public float hi()
      Returns the value of the hi record component.
      Returns:
      the value of the hi record component
    • full

      public boolean full()
      Returns the value of the full record component.
      Returns:
      the value of the full record component