Changeset 364 for trunk/src/MathUtils2.cc
- Timestamp:
- 02/03/05 18:59:17 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MathUtils2.cc
r209 r364 89 89 } 90 90 } 91 92 template <class T> 93 uInt mathutil::addEntry (Vector<T>& list, T val) 94 { 95 uInt n = list.nelements(); 96 if (n>0) { 97 for (uInt i=0; i<n; i++) { 98 if (near(list[i],val)) { 99 return i; 100 } 101 } 102 } 103 // 104 n++; 105 list.resize(n,True); 106 list(n-1) = val; 107 return n-1; 108 } 109 110 111 112 113 114
Note: See TracChangeset
for help on using the changeset viewer.