Merge remote-tracking branch 'origin/main'
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m34s
Build Docs With Doxygen / Explore-Gitea-Actions (push) Successful in 27s

# Conflicts:
#	tests/LinearAlgebra/Matrix3x3Tests.hpp
This commit is contained in:
2025-02-02 22:11:49 -05:00
3 changed files with 5 additions and 4 deletions

View File

@@ -62,11 +62,12 @@ namespace J3ML::LinearAlgebra {
Matrix3x3(const Vector3& col0, const Vector3& col1, const Vector3& col2);
/// Constructs this matrix3x3 from the given quaternion.
explicit Matrix3x3(const Quaternion& orientation);
/// Constructs this matrix3x3 from the given euler angle.
//explicit Matrix3x3(const EulerAngleXYZ& orientation);
explicit Matrix3x3(const EulerAngleXYZ& orientation) : Matrix3x3(Quaternion(orientation)) {};
//explicit Matrix3x3(const AxisAngle& orientation);
explicit Matrix3x3(const AxisAngle& orientation) : Matrix3x3(Quaternion(orientation)) {};
/// Constructs this Matrix3x3 from a pointer to an array of floats.
explicit Matrix3x3(const float *data);

View File

@@ -48,7 +48,7 @@ namespace J3ML::LinearAlgebra {
@note This function is provided for compatibility with other APIs which require raw C pointer access
to vectors. Avoid using this function in general, and instead always use the operator [] of this
class to access the elements of this vector by index. */
inline float* ptr();
float* ptr();
[[nodiscard]] const float* ptr() const;
/// Accesses an element of this vector using array notation.

View File

@@ -37,12 +37,12 @@ namespace J3ML::LinearAlgebra {
bool Vector2::operator==(const Vector2& rhs) const
{
return this->IsWithinMarginOfError(rhs);
return x == rhs.x && y == rhs.y;
}
bool Vector2::operator!=(const Vector2& rhs) const
{
return this->IsWithinMarginOfError(rhs) == false;
return !(*this == rhs);
}
Vector2 Vector2::Min(const Vector2& min) const