What is the best way to normalise CGRect values so that they are between 0 and 1 (unit coordinate system)?
How about this:
CGRect rectToConvert;
NSAffineTransform *n = [NSAffineTransform transform];
[n scaleXBy:rectToConvert.size.width
yBy:rectToConvert.size.height];
[n invert];
CGRect normalizedRect;
normalizedRect.origin = [n transformPoint:rectToConvert.origin];
normalizedRect.size = [n transformSize: rectToConvert.size];
CGPoint anyPointINeedToConvert;
CGPoint convertedPoint = [n transformPoint:anyPointINeedToConvert];
I thinks this makes it a little clearer what's going on and lets you take care of translations in an obvious way, if you have to do them.