- double sum = 0;
- for(int i=0;i<runs;i++)
- {
- if (m->control_pressed) { return 0; }
- sum += pow((scorevec[i] - nullMean),2);
- }
- return sqrt( (1/runs) * sum );
+ try{
+ double sum = 0;
+ for(int i=0;i<runs;i++)
+ {
+ if (m->control_pressed) { return 0; }
+ sum += pow((scorevec[i] - nullMean),2);
+ }
+ return sqrt( (1/double(runs)) * sum );
+ }
+ catch(exception& e) {
+ m->errorOut(e, "TrialSwap2", "getSD");
+ exit(1);
+ }