Hi All!
I have a formula which calculate position for Y, here it is:
double y = ...;
double minX = ..;
double scaleY = ..;
int MAX_COORD = (1 << 16) - 1;
int sy = ~(int)((y - minY) / scaleY * MAX_COORD) & 0xFFFF;
and now i have sy, and i need to calculate y like this:
y = (sy * scaleY) / MAX_COORD + minY;
but conversion is not equals.. i think it because I don't know how to converse ~ and & operators.