Record Class ModelRotation

java.lang.Object
java.lang.Record
kr.toxicity.model.api.tracker.ModelRotation
Record Components:
x - x-rot (pitch)
y - y-rot (yaw)

public record ModelRotation(float x, float y) extends Record
Model rotation
  • Field Details

    • EMPTY

      public static final ModelRotation EMPTY
      Empty rotation
    • INVALID

      public static final ModelRotation INVALID
      Invalid rotation
  • Constructor Details

    • ModelRotation

      public ModelRotation(float x, float y)
      Creates an instance of a ModelRotation record class.
      Parameters:
      x - the value for the x record component
      y - the value for the y record component
  • Method Details

    • equals

      public 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.
    • hashCode

      public 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
    • pitch

      @NotNull public @NotNull ModelRotation pitch()
    • yaw

      @NotNull public @NotNull ModelRotation yaw()
    • radianX

      public float radianX()
    • radianY

      public float radianY()
    • packedX

      public byte packedX()
    • packedY

      public byte packedY()
    • 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
    • x

      public float x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public float y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component