# Quaternion

class `Quaternion`

  Public Functions

  inline bool `Equals`(Quaternion const &q, int in_tolerance = HPS::Float::default_tolerance) const
  inline Quaternion `Exp`() const
  inline Quaternion `Lerp`(Quaternion const &in_right, float in_fraction) const
  inline Quaternion `Log`() const
  inline float `Norm`() const
  inline Quaternion const &`Normalize`()
  inline bool `operator!=`(Quaternion const &q) const
  inline Quaternion `operator*`(float in_right) const
  inline Quaternion `operator*`(Quaternion const &in_right) const
  inline Quaternion `operator+`(Quaternion const &in_right) const
  inline Quaternion `operator-`(Quaternion const &in_right) const
  inline Quaternion `operator/`(float in_right) const
  inline bool `operator==`(Quaternion const &q) const
  inline `Quaternion`()
  inline `Quaternion`(float in_w, float in_x, float in_y, float in_z)
  inline `Quaternion`(Quaternion const &that)
  inline Quaternion `Slerp`(Quaternion const &in_right, float in_fraction, bool in_shortest_path_only = true) const
  inline Quaternion `Spline`(Quaternion const &in_previous, Quaternion const &in_next) const

    Calculate a control point to be used in spline interpolation

    Parameters: | in_previous – The control point before this in_next – The control point after this
    Returns: | Resultant spline control point

  inline Quaternion `Squad`(Quaternion const &in_right, Quaternion const &in_control1, Quaternion const &in_control2, float in_fraction) const

    Spherical cubic interpolation between two Quaternions

    Parameters: | in_right – The Quaternion for interpolation. in_control1 – The first control point. in_control2 – The second control point. in_fraction – Interpolation distance (0 - 1).
    Returns: | Result of interpolation.

  Public Members

  float `w`
  float `x`
  float `y`
  float `z`

  Public Static Functions

  static inline Quaternion `ComputeRotation`(float in_degrees, HPS::Vector const &in_axis)

    Computes a quaternion from a rotation about an axis.

    Parameters: | in_degrees – The angle in degrees to rotate. in_axis – The axis to rotate about.
    Returns: | The resulting Quaternion object.

  static inline Quaternion `ComputeRotation`(float in_x, float in_y, float in_z)

    Computes a quaternion from a rotation around the primary axes.

    Parameters: | in_x – The number of degrees to rotate around the x-axis. in_y – The number of degrees to rotate around the y-axis. in_z – The number of degrees to rotate around the z-axis.
    Returns: | The resulting Quaternion object.

  Friends

  inline friend Quaternion `operator*`(float in_left, Quaternion const &in_right)

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Visualize Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Visualize Desktop?
What are the latest release notes for HOOPS Visualize Desktop?
How do I start evaluating HOOPS Visualize Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...