OS X cpFloat is float instead of double

Discuss any Chipmunk bugs here.

OS X cpFloat is float instead of double

Postby erikc » Wed Feb 10, 2010 3:28 am

In chipmunk_types.h:

// Use single precision floats on the iPhone.
#define CP_USE_DOUBLES 0
// use doubles by default for higher precision
#define CP_USE_DOUBLES 1

I believe the #ifdef should be an #if, since TARGET_OS_IPHONE is defined to 0 for OS X builds. This is causing cpFloat to be a float typedef instead of a double typedef on OS X. Ran into this when writing bindings to the Factor programming language.
Posts: 1
Joined: Wed Feb 10, 2010 3:14 am

Re: OS X cpFloat is float instead of double

Postby slembcke » Wed Feb 10, 2010 9:39 am

Hmm. Didn't happen for me on 10.5 with XCode 3.1.4, but I would certainly believe it if that changed.

I changed it to a #if TARGET_OS_IPHONE==1 in trunk. I'll be doing a new release soon with the new performance improvements and fixes. Hopefully in the next week or two before GDC.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
Site Admin
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest