virtual void run( void ) { std::minstd_rand0 gen(mSeed); std::vector<double> data(mCount * 2); mResult = 0.0; for (size_t i = 0; i < data.size(); ++i) { double val = (gen() % 32768) / 32768.0; data[i] = val * 2 - 1.0; } for (size_t i = 0; i < data.size(); i += 2) mResult += atan2(data[i + 1], data[i]); mResult /= mCount; }