diff options
author | Franz Zotter <fzotter@users.sourceforge.net> | 2014-01-08 16:26:26 +0000 |
---|---|---|
committer | Franz Zotter <fzotter@users.sourceforge.net> | 2014-01-08 16:26:26 +0000 |
commit | 4b5b54572476cbf6a363f21468fc4b30ce1c5c9f (patch) | |
tree | 0bea720bd8640ea16d3fa49a4d75eef7a2437b8f /src | |
parent | 4fc2fa90574865a43156c030c9b5e976952045c5 (diff) |
corrected case in which result of [mtx_min2] and [mtx_max2] was sum instead of minimum/maximum.
svn path=/trunk/externals/iem/iemmatrix/; revision=17237
Diffstat (limited to 'src')
-rw-r--r-- | src/mtx_max2.c | 2 | ||||
-rw-r--r-- | src/mtx_min2.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mtx_max2.c b/src/mtx_max2.c index 27da1f3..a1c7606 100644 --- a/src/mtx_max2.c +++ b/src/mtx_max2.c @@ -109,7 +109,7 @@ static void mtx_max2_float(t_mtx_binmtx *x, t_float f) n=row2*col2; while(n--){ - SETFLOAT(ap, f+atom_getfloat(ap2++)); + SETFLOAT(ap, (f>atom_getfloat(ap2))?f:atom_getfloat(ap2)); ap++; } diff --git a/src/mtx_min2.c b/src/mtx_min2.c index 846cd31..a76ddb2 100644 --- a/src/mtx_min2.c +++ b/src/mtx_min2.c @@ -109,7 +109,8 @@ static void mtx_min2_float(t_mtx_binmtx *x, t_float f) n=row2*col2; while(n--){ - SETFLOAT(ap, f+atom_getfloat(ap2++)); + SETFLOAT(ap, (f<atom_getfloat(ap2))?f:atom_getfloat(ap2)); + ap2++; ap++; } |