01 | - ( BOOL ) circle:(CGPoint) circlePoint withRadius:( float ) radius collisionWithCircle:(CGPoint) circlePointTwo collisionCircleRadius:( float ) radiusTwo |
02 | { |
03 | float xdif = circlePoint.x - circlePointTwo.x; |
04 | float ydif = circlePoint.y - circlePointTwo.y; |
05 | |
06 | float distance = sqrt (xdif*xdif+ydif*ydif); |
07 | |
08 | if (distance <= radius+radiusTwo) return YES; |
09 | |
10 | return NO; |
11 | } |
0 Comments