Implement Matrix3x3::IsRowOrthogonal IsColOrthogonal

This commit is contained in:
2024-03-21 18:37:43 -04:00
parent 802c321115
commit 06bb959e3f
2 changed files with 16 additions and 2 deletions

View File

@@ -397,8 +397,18 @@ namespace J3ML::LinearAlgebra {
return *this * rhs;
}
void Matrix3x3::IsColOrthogonal() {
bool Matrix3x3::IsRowOrthogonal(float epsilon) const
{
return GetRow(0).IsPerpendicular(GetRow(1), epsilon)
&& GetRow(0).IsPerpendicular(GetRow(2), epsilon)
&& GetRow(1).IsPerpendicular(GetRow(2), epsilon);
}
bool Matrix3x3::IsColOrthogonal(float epsilon) const
{
return GetColumn(0).IsPerpendicular(GetColumn(1), epsilon)
&& GetColumn(0).IsPerpendicular(GetColumn(2), epsilon)
&& GetColumn(1).IsPerpendicular(GetColumn(2), epsilon);
}
}