Thanks for the responses, i got it. I actually changed what i wanted a little bit, but its the same idea. instead of just rounding up the largeest digit, it rounds the second largest (the values are for use in a graph so i only need a small gap between the rounds. If I chose 1,100,000 with my previous request i would get 2,000,000 which is a huge difference and not good, but now i will get 1,200,000 which works out perfectly.
My solution, not pretty but it works:
Code:
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init] autorelease];
[formatter setRoundingMode:NSNumberFormatterRoundCeiling];
float digitToRound = pow(10, (double)[f stringFromNumber:[NSNumberWithFloat:floatToRound] length] - 2]);
return [[formatter stringFromNumber:[NSNumber numberWithFloat:(floatToRound / digitToRound)]] floatValue] * digitToRound;
this stops rounding when floatToRound is double digits and returns NAN when floatToRound is single digits. however for my purposes, those cases will never occur so i dont care.