I'm fighting somewhat with Blenders image creation module. I struggle to map my calculated colors to the required range from 0.0 to 1.0. I need it to be very precise.
For example: I have a value 0.5 that will result in a value of 128 in the related color channel of the image. Then I have a value of 0.50390625 that I expected to result in 129, but becomes a 128 as well. Is there a formula or a list somewhere that shows exactly what ranges of floats are mapped to what integers? Or maybe someone can point me to the source-files, then I'd try to figure it out by myself. (I tried to locate the source file for this module but couldnt find it.)