Commit de76a6c5 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'acg-mat3x3-getters' into 'master'

ACG Matrix3x3T: add getRow() and getCol() convenience getters

See merge request !128
parents 470f345e 9cf80001
......@@ -95,6 +95,13 @@ class Matrix3x3T {
return values_[i];
}
Vec3 getRow(uint_fast8_t r) const {
return Vec3((*this)(r,0), (*this)(r,1), (*this)(r,2));
}
Vec3 getCol(uint_fast8_t c) const {
return Vec3((*this)(0,c), (*this)(1,c), (*this)(2,c));
}
constexpr Matrix3x3T operator*(const Matrix3x3T &rhs) const {
return Matrix3x3T {{
(*this)(0, 0) * rhs(0, 0) + (*this)(0, 1) * rhs(1, 0) + (*this)(0, 2) * rhs(2, 0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment