diff options
author | Thomas White <taw@physics.org> | 2019-03-09 11:37:34 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-03-11 16:49:37 +0100 |
commit | 252f4073f0041027b5e9e6773fe892ffe465ed23 (patch) | |
tree | 5143d2b86c6ef0f7ea93c93149ffad7f015e71d3 /libcrystfel/src/rational.c | |
parent | e94501d025e8d6b4f4e446004e80a1badfbba30f (diff) |
Single point of truth for matrix memory layout
Diffstat (limited to 'libcrystfel/src/rational.c')
-rw-r--r-- | libcrystfel/src/rational.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/rational.c b/libcrystfel/src/rational.c index 4f02c8b1..5f17b0ea 100644 --- a/libcrystfel/src/rational.c +++ b/libcrystfel/src/rational.c @@ -367,7 +367,7 @@ RationalMatrix *rtnl_mtx_from_intmat(const IntegerMatrix *m) for ( i=0; i<rows; i++ ) { for ( j=0; j<cols; j++ ) { - n->v[j+cols*i] = rtnl(intmat_get(m, i, j), 1); + rtnl_mtx_set(n, i, j, rtnl(intmat_get(m, i, j), 1)); } } @@ -537,7 +537,7 @@ void rtnl_mtx_print(const RationalMatrix *m) fprintf(stderr, "[ "); for ( j=0; j<m->cols; j++ ) { - char *v = rtnl_format(m->v[j+m->cols*i]); + char *v = rtnl_format(rtnl_mtx_get(m, i, j)); fprintf(stderr, "%4s ", v); free(v); } |