Commit 0ac840a0 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'matrix-setrowcol' into 'master'

Matrix3x3T: implement setRow/setCol.

See merge request !149
parents 85ac7336 7b584768
......@@ -98,9 +98,19 @@ class Matrix3x3T {
Vec3 getRow(uint_fast8_t r) const {
return Vec3((*this)(r,0), (*this)(r,1), (*this)(r,2));
}
void setRow(uint_fast8_t r, const Vec3 &v) {
for (uint_fast8_t c = 0; c < 3; ++c) {
(*this)(r, c) = v[c];
}
}
Vec3 getCol(uint_fast8_t c) const {
return Vec3((*this)(0,c), (*this)(1,c), (*this)(2,c));
}
void setCol(uint_fast8_t c, const Vec3 &v) {
for (uint_fast8_t r = 0; r < 3; ++r) {
(*this)(r, c) = v[r];
}
}
constexpr Matrix3x3T operator*(const Matrix3x3T &rhs) const {
return Matrix3x3T {{
......
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