Record Class GivensParameters

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

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

    Fields
    Modifier and Type
    Field
    Description
    private final float
    The field for the cosHalf record component.
    private final float
    The field for the sinHalf record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GivensParameters(float sinHalf, float cosHalf)
    Creates an instance of a GivensParameters record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.joml.Matrix3f
    aroundX(org.joml.Matrix3f p_276268_)
     
    org.joml.Quaternionf
    aroundX(org.joml.Quaternionf p_276271_)
     
    org.joml.Matrix3f
    aroundY(org.joml.Matrix3f p_276274_)
     
    org.joml.Quaternionf
    aroundY(org.joml.Quaternionf p_276323_)
     
    org.joml.Matrix3f
    aroundZ(org.joml.Matrix3f p_276317_)
     
    org.joml.Quaternionf
    aroundZ(org.joml.Quaternionf p_276281_)
     
    float
    cos()
     
    float
    Returns the value of the cosHalf record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    fromPositiveAngle(float p_276260_)
     
    fromUnnormalized(float p_276277_, float p_276305_)
     
    final int
    Returns a hash code value for this object.
     
    float
    sin()
     
    float
    Returns the value of the sinHalf record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 p_276277_, float p_276305_)
    • fromPositiveAngle

      public static GivensParameters fromPositiveAngle(float p_276260_)
    • inverse

      public GivensParameters inverse()
    • aroundX

      public org.joml.Quaternionf aroundX(org.joml.Quaternionf p_276271_)
    • aroundY

      public org.joml.Quaternionf aroundY(org.joml.Quaternionf p_276323_)
    • aroundZ

      public org.joml.Quaternionf aroundZ(org.joml.Quaternionf p_276281_)
    • cos

      public float cos()
    • sin

      public float sin()
    • aroundX

      public org.joml.Matrix3f aroundX(org.joml.Matrix3f p_276268_)
    • aroundY

      public org.joml.Matrix3f aroundY(org.joml.Matrix3f p_276274_)
    • aroundZ

      public org.joml.Matrix3f aroundZ(org.joml.Matrix3f p_276317_)
    • 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