diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2008-01-03 13:07:48 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2008-01-03 13:07:48 +0000 |
commit | 0bad9be7b54fce990a34af835aa01ad6568395da (patch) | |
tree | 3933843c3bdf02c4175493cd2ba530aa67c9f19b /src | |
parent | c3a067dc355fc57a5759d4e9a97bcbcd878caf13 (diff) |
fixed mtx_diegg and tests (it was really inconsistent)
svn path=/trunk/externals/iem/iemmatrix/; revision=9115
Diffstat (limited to 'src')
-rw-r--r-- | src/mtx_diegg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mtx_diegg.c b/src/mtx_diegg.c index 394a3b6..0c17294 100644 --- a/src/mtx_diegg.c +++ b/src/mtx_diegg.c @@ -21,7 +21,10 @@ static void mtx_diegg_matrix(t_matrix *x, t_symbol *s, int argc, t_atom *argv) t_atom *ap = (t_atom *)getbytes(length * sizeof(t_atom)), *dummy=ap; if(row*col>argc-2)post("mtx_diegg: sparse matrices not yet supported : use \"mtx_check\""); else { - for(n=0;n<length;n++, dummy++)SETFLOAT(dummy, atom_getfloat(argv+(n-1)*(col-1))); + for(n=0;n<length;n++, dummy++){ + int index=(n+1)*(col-1); + SETFLOAT(dummy, atom_getfloat(argv+index)); + } outlet_list(x->x_obj.ob_outlet, gensym("diegg"), length, ap); } freebytes(ap, (length * sizeof(t_atom))); @@ -34,11 +37,8 @@ static void *mtx_diegg_new(t_symbol *s, int argc, t_atom *argv) x->atombuffer = 0; if(!argc)return(x); - x->atombuffer = (t_atom *)getbytes((argc*argc+2)*sizeof(t_atom)); - setdimen(x, argc, argc); - matrix_set(x, 0); - argv+=argc-1; - while(argc--)SETFLOAT(x->atombuffer+2+argc*(1+x->col), atom_getfloat(argv--)); + + matrix_diegg(x, s, argc, argv); return (x); } |