In chipmunk_types.h:
// Use single precision floats on the iPhone.
#ifdef TARGET_OS_IPHONE
#define CP_USE_DOUBLES 0
#else
// use doubles by default for higher precision
#define CP_USE_DOUBLES 1
#endif
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.
OS X cpFloat is float instead of double
-
- Posts: 1
- Joined: Wed Feb 10, 2010 3:14 am
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: OS X cpFloat is float instead of double
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.
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/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 2 guests