This method in Cocos2d:
/** Returns opposite of point.
@return CGPoint
@since v0.7.2
*/
static inline CGPoint
ccpNeg(const CGPoint v)
{
return ccp(-v.x, -v.y);
}
Why does it say ‘CGPoint’ after inline? Why not
static inline ccpNeg(...
?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because the function wants to return a CGPoint.