Skip to content

Conversation

@DagAgren
Copy link
Contributor

@DagAgren DagAgren commented Sep 3, 2017

When bridging this library into Swift, the stricter typing means that all the CGFloat values from UIKit have to be cast back and forth from cpFloat. With this change, cpFloat is typedefed CGFloat if CP_USE_CGTYPES is set, which means no casts are required. This should have no effect when used from C, as CGFloat should be either float or double depending on the same conditions as cpFloat uses.

@slembcke
Copy link
Owner

Are equivalent C types still handled this way in Swift? I was hoping to try to cleanup and simplify the macro gobbledygook in chipmunk_types.h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants