equal
deleted
inserted
replaced
8 */ |
8 */ |
9 |
9 |
10 #include "CGPointUtils.h" |
10 #include "CGPointUtils.h" |
11 #include <math.h> |
11 #include <math.h> |
12 |
12 |
13 #define degreesToRadian(x) (M_PI * x / 180.0) |
|
14 #define radiansToDegrees(x) (180.0 * x / M_PI) |
|
15 |
13 |
16 CGFloat distanceBetweenPoints (CGPoint first, CGPoint second) { |
14 CGFloat distanceBetweenPoints (CGPoint first, CGPoint second) { |
17 CGFloat deltaX = second.x - first.x; |
15 CGFloat deltaX = second.x - first.x; |
18 CGFloat deltaY = second.y - first.y; |
16 CGFloat deltaY = second.y - first.y; |
19 return sqrt(deltaX*deltaX + deltaY*deltaY ); |
17 return sqrt(deltaX*deltaX + deltaY*deltaY ); |