Changeset 14138 for trunk/FACT++/src/smartfact.cc
- Timestamp:
- 06/09/12 21:54:08 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r14136 r14138 540 540 out << stat.min << '\n'; 541 541 out << stat.med << '\n'; 542 out << stat.max << '\ 0';542 out << stat.max << '\x7f'; 543 543 for (auto it=vec.begin(); it!=vec.end(); it++) 544 544 { … … 548 548 for (uint64_t i=0; i<it->size(); i++) 549 549 { 550 float range = nearbyint(126*(double(it->at(i))-offset)/scale) +1; // [-2V; 2V]551 if (range>12 7)552 range=12 7;553 if (range< 1)554 range= 1;550 float range = nearbyint(126*(double(it->at(i))-offset)/scale); // [-2V; 2V] 551 if (range>126) 552 range=126; 553 if (range<0) 554 range=0; 555 555 val[i] = (uint8_t)range; 556 556 } … … 558 558 const char *ptr = reinterpret_cast<char*>(val.data()); 559 559 out.write(ptr, val.size()*sizeof(uint8_t)); 560 out << '\ 0';560 out << '\x7f'; 561 561 } 562 562
Note:
See TracChangeset
for help on using the changeset viewer.