| 95 | } |
| 96 | |
| 97 | void mul(const mat33 &a, const mat3x &b, mat3x *result) |
| 98 | { |
| 99 | if (b.cols() != result->cols()) |
| 100 | { |
| 101 | bt_id_error_message("size missmatch. b.cols()= %d, result->cols()= %d\n", |
| 102 | static_cast<int>(b.cols()), static_cast<int>(result->cols())); |
| 103 | abort(); |
| 104 | } |
| 105 | |
| 106 | for (idArrayIdx col = 0; col < b.cols(); col++) |
| 107 | { |
| 108 | const idScalar x = a(0, 0) * b(0, col) + a(0, 1) * b(1, col) + a(0, 2) * b(2, col); |
| 109 | const idScalar y = a(1, 0) * b(0, col) + a(1, 1) * b(1, col) + a(1, 2) * b(2, col); |
| 110 | const idScalar z = a(2, 0) * b(0, col) + a(2, 1) * b(1, col) + a(2, 2) * b(2, col); |
| 111 | setMat3xElem(0, col, x, result); |
| 112 | setMat3xElem(1, col, y, result); |
| 113 | setMat3xElem(2, col, z, result); |
| 114 | } |
| 115 | } |
| 116 | void add(const mat3x &a, const mat3x &b, mat3x *result) |
| 117 | { |
| 118 | if (a.cols() != b.cols()) |
no test coverage detected