I have some calculation that involves negative values:
row = (stagePosition - col) / PHNumRow;
Say stagePosition is -7 and col is 1. They are both NSInteger, including row. PHNumRow is 8.
If PHNumRow is NSInteger, I get the result I expect: -1. But if PHNumRow is NSUInteger, the result is garbage.
Why should it matter if the divisor is unsigned or signed? I'm not putting the result in an unsigned int.