Record Class GivensParameters

java.lang.Object
java.lang.Record
com.mojang.math.GivensParameters

public record GivensParameters(float sinHalf, float cosHalf) extends Record
  • Field Details

    • sinHalf

      private final float sinHalf
      The field for the sinHalf record component.
    • cosHalf

      private final float cosHalf
      The field for the cosHalf record component.
  • Constructor Details

    • GivensParameters

      public GivensParameters(float sinHalf, float cosHalf)
      Creates an instance of a GivensParameters record class.
      Parameters:
      sinHalf - the value for the sinHalf record component
      cosHalf - the value for the cosHalf record component
  • Method Details

    • fromUnnormalized

      public static GivensParameters fromUnnormalized(float pSinHalf, float pCosHalf)
    • fromPositiveAngle

      public static GivensParameters fromPositiveAngle(float pAngle)
    • inverse

      public GivensParameters inverse()
    • aroundX

      public Quaternionf aroundX(Quaternionf pQuaternion)
    • aroundY

      public Quaternionf aroundY(Quaternionf pQuaternion)
    • aroundZ

      public Quaternionf aroundZ(Quaternionf pQuaternion)
    • cos

      public float cos()
    • sin

      public float sin()
    • aroundX

      public Matrix3f aroundX(Matrix3f pMatrix)
    • aroundY

      public Matrix3f aroundY(Matrix3f pMatrix)
    • aroundZ

      public Matrix3f aroundZ(Matrix3f pMatrix)
    • 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.
    • sinHalf

      public float sinHalf()
      Returns the value of the sinHalf record component.
      Returns:
      the value of the sinHalf record component
    • cosHalf

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