Quote:
|
p2_x and p2_y are unsigned integers. When your subtract from them to end up with a negative value, the computer will start to have problems. Store them in signed integers before you try to subtract 122.
|
AFAIK, this shouldn't be a problem.
You are not actually changing the values of p2_y and p2_x, are you? If you are just using the for calculations, it shouldn't matter what type they are.
Sorry if I'm wrong, I can't test it right now. Otherwise I would just cast p2_y as an int instead of declaring a separate variable.