devkitPro / citro3d

Homebrew PICA200 GPU wrapper library for Nintendo 3DS
zlib License
248 stars 35 forks source link

Added Mtx_Transpose(). #23

Closed tommai78101 closed 8 years ago

tommai78101 commented 8 years ago

Mtx_Transpose() transposes a 4x4 matrix. Row to column and column to row. Does not support MxN matrices.

mtheall commented 8 years ago

As far as I can tell this looks correct. Can you add a test case and also squash the commits?

tommai78101 commented 8 years ago

That is the thing. I have trouble adding test cases, since PR #21. I can go ahead and squash them.

The issue I'm having is whenever I added new functions to the c3d/maths.h and new C files, GCC (make) won't be able to see the new changes, and thus, would get "undefined references." when compiling. I don't know how to fix this.

mtheall commented 8 years ago

I think we solved your "undefined reference" problem. I will open an issue for that.

Your transposition flips around the wrong diagonal. Another case of using c[i] instead of c[3-i].

fincs commented 8 years ago

See #26.