[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
Chipmunk Physics • View topic - using floats with macosx

using floats with macosx

Discuss new features and future development.

using floats with macosx

Postby diegor » Sat Jan 14, 2012 8:32 pm

I want to use the same precision (float) in both my ios and macosx builds of my code. The problem is that the macros in chipmunk_types.h read:

#if defined(__LP64__) && __LP64__
#define CP_USE_DOUBLES 1
#else
#define CP_USE_DOUBLES 0
#endif

Should the code be changed so those lines are ignored if CP_USE_DOUBLES have been already defined?

Thanks!
diegor
 
Posts: 6
Joined: Wed Jun 22, 2011 12:38 pm

Re: using floats with macosx

Postby slembcke » Sat Jan 14, 2012 10:07 pm

Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: using floats with macosx

Postby diegor » Sun Jan 15, 2012 9:02 pm

The problem is that in my case I want to use floats and also CGPoints, that's why I was suggesting the change above, which should be harmless to existing code.

Thanks again for your help!
diegor
 
Posts: 6
Joined: Wed Jun 22, 2011 12:38 pm

Re: using floats with macosx

Postby slembcke » Sun Jan 15, 2012 9:48 pm

CGFloats (and therefore CGPoints) are defined differently depending on if you are no a 32 or 64 bit system. That's why I have the 64bit check in the typedef.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron