Fixed quaternion equals operator

This commit is contained in:
2025-02-09 11:32:46 -05:00
parent b897b13880
commit b21236e5db
4 changed files with 21 additions and 14 deletions

View File

@@ -30,9 +30,9 @@ float Quaternion::operator[](uint8_t index) const
return 1e+6;
}
void Quaternion::operator=(const Quaternion &other) const
void Quaternion::operator=(const Quaternion &other)
{
static_cast<Matrix<1, 4>>(this->matrix) = static_cast<Matrix<1, 4>>(other.matrix);
memcpy(&(this->matrix), &(other.matrix), 4 * sizeof(float));
}
Quaternion Quaternion::operator*(const Quaternion &other) const

View File

@@ -29,7 +29,7 @@ public:
/**
* @brief Assign one quaternion to another
*/
void operator=(const Quaternion &other) const;
void operator=(const Quaternion &other);
/**
* @brief Do quaternion multiplication