Add TMatrix2.
This commit is contained in:
parent
2bbeff1e23
commit
f137d6ba8a
@ -86,6 +86,11 @@ namespace Phanes::Core::Math {
|
|||||||
typedef TVector4<double, SIMD::use_simd<double, 4, true>::value> Vector4Regd;
|
typedef TVector4<double, SIMD::use_simd<double, 4, true>::value> Vector4Regd;
|
||||||
typedef TVector4<double, SIMD::use_simd<double, 4, true>::value> Vector4Regf64;
|
typedef TVector4<double, SIMD::use_simd<double, 4, true>::value> Vector4Regf64;
|
||||||
|
|
||||||
|
// Matrix2
|
||||||
|
|
||||||
|
typedef TMatrix2<float> Matrix2;
|
||||||
|
typedef TMatrix2<float> Matrix2f;
|
||||||
|
typedef TMatrix2<double> Matrix2d;
|
||||||
|
|
||||||
} // Phanes::Core::Math::coretypes
|
} // Phanes::Core::Math::coretypes
|
||||||
|
|
||||||
|
@ -98,7 +98,11 @@ namespace Phanes::Core::Math {
|
|||||||
return "(" + ToString(v.x) + ", " + ToString(v.y) + ", " + ToString(v.z) + ", " + ToString(v.w) + ")";
|
return "(" + ToString(v.x) + ", " + ToString(v.y) + ", " + ToString(v.z) + ", " + ToString(v.w) + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
//std::string toString(const Vector4& v);
|
template<RealType T>
|
||||||
|
std::string ToString(const TMatrix2<T>& m)
|
||||||
|
{
|
||||||
|
return "([" + ToString(m(0, 0)) + ", " + ToString(m(0, 1)) + "], [" + ToString(m(1, 0)) + ", " + ToString(m(1, 1)) + "])";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//std::string toString(const Matrix3& v);
|
//std::string toString(const Matrix3& v);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user