Merge remote-tracking branch 'origin/main'
# Conflicts: # tests/LinearAlgebra/Matrix3x3Tests.hpp
This commit is contained in:
@@ -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);
|
||||
|
@@ -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.
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user