projects
/
gph-cmath
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0bbed0
)
chm_msubmatrix
author
John Tsiombikas
<nuclear@mutantstargoat.com>
Mon, 1 Oct 2018 19:39:39 +0000
(22:39 +0300)
committer
John Tsiombikas
<nuclear@mutantstargoat.com>
Mon, 1 Oct 2018 19:39:39 +0000
(22:39 +0300)
src/cgmmat.inl
patch
|
blob
|
history
diff --git
a/src/cgmmat.inl
b/src/cgmmat.inl
index
86dd63d
..
5afb224
100644
(file)
--- a/
src/cgmmat.inl
+++ b/
src/cgmmat.inl
@@
-79,6
+79,19
@@
static inline void cgm_mgetcol_v4(cgm_vec4 *v, const float *m, int idx)
static inline void cgm_msubmatrix(float *m, int row, int col)
{
+ int i, j;
+ for(i=0; i<4; i++) {
+ for(j=0; j<4; j++) {
+ int si = i;
+ int sj = j;
+ if(i >= col) si++;
+ if(j >= row) sj++;
+
+ if(si == i && sj == j) continue;
+
+ m[i * 4 + j] = m[si * 4 + sj];
+ }
+ }
}
static inline void cgm_mupper3(float *m)