Changeset 2557 for trunk/MagicSoft/Mars/mdata
- Timestamp:
- 11/22/03 21:14:14 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mdata
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mdata/MDataList.cc
r2206 r2557 76 76 fSign = kEPlus; 77 77 return; 78 case '%': 79 fSign = kEModul; 80 return; 78 81 default: 79 82 fSign = kENone; … … 148 151 } 149 152 break; 153 154 case kEModul: 155 while ((member=(MData*)Next())) 156 { 157 Double_t d = member->GetValue(); 158 if (d==0) 159 { 160 *fLog << warn << "Warning: Modulo division by zero (" << member->GetName() << ")" << endl; 161 return 0; 162 } 163 val = fmod(val, d); 164 } 165 break; 150 166 } 151 167 return val; … … 315 331 str += "/"; 316 332 break; 333 334 case kEModul: 335 str += "%"; 336 break; 317 337 } 318 338 -
trunk/MagicSoft/Mars/mdata/MDataList.h
r1574 r2557 23 23 TOrdCollection fMembers; // Container for the filters 24 24 25 typedef enum { kENone, kEPlus, kEMinus, kEMult, kEDiv } SignType_t;25 typedef enum { kENone, kEPlus, kEMinus, kEMult, kEDiv, kEModul } SignType_t; 26 26 SignType_t fSign; 27 27
Note:
See TracChangeset
for help on using the changeset viewer.