The following code:
CGFloat currentDistance = distanceBetweenPoints(firstTouch,secondTouch);
gives me this error: Implicit declaration of ‘distanceBetweenPoints’ is invalid in C99
firstTouch and secondTouch are CGPoints
CGPoint firstTouch = [tOne locationInView:[tOne view]];
CGPoint secondTouch = [tTwo locationInView:[tTwo view]];
How do I get rid of this error?
I suppose you’re using a very old version of Cocos2D? I only know this method by the name of
ccpDistance. See: http://learn-cocos2d.com/api-ref/latest/cocos2d-iphone/html/_c_g_point_extension_8h.html#a76b1b389db811d00e0a461df630d9a8e