OS X cpFloat is float instead of double
Posted: Wed Feb 10, 2010 3:28 am
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.
// 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.