Using iPhone/Objective C CGFloats: Is 0.1 okay, or should it be 0.1f?
When using an iPhone Objective C method that accepts CGFloat s, e.g. [UIColor colorWithRed:green:blue:] , is it important to append a f to constant arguments to specifiy them explicitly as floats, e.g. should I always type 0.1f rather than 0.1 in such cases? Or does the compiler automatically cast 0.1 (which is a double in general) to 0.1f (which is a float) at compile time? I don't wish to have these casts happen at run time because they would unneccessarily hog performance. Thanks in advance MrMage It's not important ; it won't break anything to use a double-precision constant where a single