comparison data/model/PowerOfSqrtTwoZoomConstraint.cpp @ 687:06f13a3b9e9e debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:09 +0100
parents d7f3dfe6f9a4
children 1424aa29ae95
comparison
equal deleted inserted replaced
686:b4a8d8221eaf 687:06f13a3b9e9e
49 size_t rval; 49 size_t rval;
50 if (dir == RoundUp) rval = size_t(val + 0.01); 50 if (dir == RoundUp) rval = size_t(val + 0.01);
51 else if (dir == RoundDown) rval = size_t(prevVal + 0.01); 51 else if (dir == RoundDown) rval = size_t(prevVal + 0.01);
52 else if (val - blockSize < blockSize - prevVal) rval = size_t(val + 0.01); 52 else if (val - blockSize < blockSize - prevVal) rval = size_t(val + 0.01);
53 else rval = size_t(prevVal + 0.01); 53 else rval = size_t(prevVal + 0.01);
54 // std::cerr << "returning " << rval << std::endl; 54 // DEBUG << "returning " << rval << endl;
55 return rval; 55 return rval;
56 } 56 }
57 57
58 unsigned int prevBase = (1 << minCachePower); 58 unsigned int prevBase = (1 << minCachePower);
59 unsigned int prevPower = minCachePower; 59 unsigned int prevPower = minCachePower;
72 } else { 72 } else {
73 base = (((unsigned int)((1 << minCachePower) * sqrt(2.) + 0.01)) 73 base = (((unsigned int)((1 << minCachePower) * sqrt(2.) + 0.01))
74 << (power - minCachePower)); 74 << (power - minCachePower));
75 } 75 }
76 76
77 // std::cerr << "Testing base " << base << std::endl; 77 // DEBUG << "Testing base " << base << endl;
78 78
79 if (base == blockSize) { 79 if (base == blockSize) {
80 result = base; 80 result = base;
81 break; 81 break;
82 } 82 }