We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mul()
#include "linalg.h" #include <iostream> using namespace linalg::aliases; using namespace linalg::ostream_overloads; using namespace std; int main() { float3x3 A = { {1.f, 0.f, 3.f}, {0.f, 1.f, 3.f}, {0.f, 0.f, 1.f}, }; float3x3 B = { {2.f, 0.f, 0.f}, {0.f, 2.f, 0.f}, {0.f, 0.f, 1.f}, }; cout << mul(A, B) << endl; /* * the result output by this program is {{2,0,6},{0,2,6},{0,0,1}}, while by Octave: * * >> a = [ [1 0 3]; [0 1 3]; [0 0 1] ] * a = * * 1 0 3 * 0 1 3 * 0 0 1 * * >> b = [[2 0 0]; [0 2 0]; [0 0 1]] * b = * * 2 0 0 * 0 2 0 * 0 0 1 * * >> a * b * ans = * * 2 0 3 * 0 2 3 * 0 0 1 * */ return 0; }
while the document states mul(mat<T,M,N> a, mat<T,N,P> b) -> mat<T,M,P>, the library seems to calculate mul(b, a).
mul(mat<T,M,N> a, mat<T,N,P> b) -> mat<T,M,P>
mul(b, a)
Is something I made wrong? or there is a bug in the library?
The text was updated successfully, but these errors were encountered:
Ohh, I understand why. I mixed the rows and columns of the initialization list.
Sorry, something went wrong.
No branches or pull requests
while the document states
mul(mat<T,M,N> a, mat<T,N,P> b) -> mat<T,M,P>
, the library seems to calculatemul(b, a)
.Is something I made wrong? or there is a bug in the library?
The text was updated successfully, but these errors were encountered: