** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: mathfuncs.cpp,v 1.5 2001/01/01 10:14:34 kevin Exp $
+** $Id: mathfuncs.cpp,v 1.6 2001/01/02 05:34:57 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
min = vec[0];\r
max = vec[0];\r
int i;\r
- int iMinPos = 0;\r
for (i = 0; i < nPoints; i++) {\r
double v = vec[i];\r
if (v > max)\r
max = v;\r
- if (v < min) {\r
+ if (v < min)\r
min = v;\r
- iMinPos = i;\r
- }\r
mean += v;\r
}\r
mean /= nPoints;\r