Re: Float constants
Re: Float constants
- Subject: Re: Float constants
- From: Nick Zitzmann <email@hidden>
- Date: Wed, 17 Mar 2010 16:52:10 -0600
On Mar 17, 2010, at 4:26 PM, Sean McBride wrote:
> But anyway, CGFloat is sometimes float sometimes double, so how does -
> fsingle-precision-constant help you?
For me, anyway, setting that compiler flag is SOP when building for 32-bit code. A lot of older 32-bit Cocoa code was written under the assumption that it's okay to use double constants in places that expect floats, because under Xcode's default warning set, nothing happens when the code does that. Changing them to float constants is tedious and causes a little (insignificant) precision loss when building for 64-bit, so I just keep them as double constants and use that flag to make them into float constants on 32-bit builds.
Of course, I don't think there is any one true way of tackling this problem...
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden