Browse Source

darkness better checked, sleep is no more

master
Joshua Moerman 13 years ago
parent
commit
813e643cb2
  1. 14
      canvae/PNG.hpp
  2. 2
      main.cpp

14
canvae/PNG.hpp

@ -72,16 +72,16 @@ public:
}
}
if(n > 100) {
const double average = cumulative / (double)n;
power[i] = -2.5/log(average/(double)max_int[i]);
if(power[i] < 0)
power[i] = 1;
} else {
const double average = cumulative / (double)(width*height);
power[i] = -2.5/log(average/(double)max_int[i]);
if(power[i] < 0) {
power[i] = 1;
LogInfo("negative power\n");
}
if(n <= width) {
if(n < width) {
LogInfo("not enough data\n");
return;
}

2
main.cpp

@ -101,7 +101,7 @@ int main(int argc, char* argv[]) {
myAttractor.iterate();
myAttractor.plot();
}
if (j%16 == 0) sleep(1);
//if (j%16 == 0) sleep(1);
if(verbose >= 0) {
std::cout << "\r" << j << " out of " << iterations << " done." << std::flush;
}