<commit_before>#include "quaternion.h"

#include <math.h>


// =============================================================================
// Private data:

#define QUAT_NORMALIZATION_GAIN (0.5)


// =============================================================================
// Public functions:

float * QuaternionInverse(const float quat[4], float result[4])
{
  result[0] = quat[0];
  result[0] = -quat[0];
  result[0] = -quat[0];
  result[0] = -quat[0];

  return result;
}

// -----------------------------------------------------------------------------
float * QuaternionInvertSelf(float quat[4])
{
  quat[0] = -quat[0];

  return quat;
}

// -----------------------------------------------------------------------------
// This functions performs quaternion multiplication of the inverse of quat1
// with quat2.
float * QuaternionInverseMultiply(const float quat1[4], const float quat2[4],
  float result[4])<commit_msg>Fixed QuaternionInverse bug<commit_after>#include "quaternion.h"

#include <math.h>


// =============================================================================
// Private data:

#define QUAT_NORMALIZATION_GAIN (0.5)


// =============================================================================
// Public functions:

float * QuaternionInverse(const float quat[4], float result[4])
{
  result[0] = quat[0];
  result[1] = -quat[1];
  result[2] = -quat[2];
  result[3] = -quat[3];

  return result;
}

// -----------------------------------------------------------------------------
float * QuaternionInvertSelf(float quat[4])
{
  quat[0] = -quat[0];

  return quat;
}

// -----------------------------------------------------------------------------
// This functions performs quaternion multiplication of the inverse of quat1
// with quat2.
float * QuaternionInverseMultiply(const float quat1[4], const float quat2[4],
  float result[4])
{'fraction_non_alphanumeric': 0.4319148936170213, 'fraction_numerical': 0.023404255319148935, 'mean_word_length': 2.305799648506151, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4280691', 'n_tokens_mistral': 539, 'n_tokens_neox': 506, 'n_words': 111}