aboutsummaryrefslogtreecommitdiff
path: root/src/mtx_min2.c
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2014-01-08 16:26:26 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2014-01-08 16:26:26 +0000
commit4b5b54572476cbf6a363f21468fc4b30ce1c5c9f (patch)
tree0bea720bd8640ea16d3fa49a4d75eef7a2437b8f /src/mtx_min2.c
parent4fc2fa90574865a43156c030c9b5e976952045c5 (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/mtx_min2.c')
-rw-r--r--src/mtx_min2.c3
1 files changed, 2 insertions, 1 deletions
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++;
}