This code was shifting by 8 bits (multiplying by 256) instead of 4 (to multiply by 16). In addition, C and C++ apparently have weird promotion rules regarding bitwise operations , which got us into oddity and undefined behavior territory (I have not investigated what precisely). Another problem was the division by 256.0, which is incorrect because mapping the range [0, 255] to [0, 1] requires dividing by 255.0.
Fix this by replacing the expression with a simple and correct arithmetic operation where typing is clear.
Closes #6200 (closed)