equal
deleted
inserted
replaced
7 * |
7 * |
8 */ |
8 */ |
9 |
9 |
10 #import <CoreGraphics/CoreGraphics.h> |
10 #import <CoreGraphics/CoreGraphics.h> |
11 |
11 |
12 #define degreesToRadian(x) (M_PI * x / 180.0) |
12 #define degreesToRadians(x) ( M_PI * x / 180.0) |
13 #define radiansToDegrees(x) (180.0 * x / M_PI) |
13 #define radiansToDegrees(x) (180.0 * x / M_PI ) |
14 |
14 |
15 #define HWX(x) (int)(x-screen.size.height/2) |
15 // 40 is not a good value for iphone but works for ipad |
16 #define HWY(x) (int)(screen.size.width-x) |
16 #define HWX(x) (int)(x-screen.size.height/2)/HW_zoomFactor() |
|
17 #define HWY(x) (int)(screen.size.width-x)/HW_zoomFactor() + 40*HW_zoomLevel()/HW_zoomFactor() |
|
18 |
|
19 #define HWXZ(x) (int)(x-screen.size.height/2) |
|
20 #define HWYZ(x) (int)(screen.size.width-x) |
17 |
21 |
18 CGFloat distanceBetweenPoints (CGPoint first, CGPoint second); |
22 CGFloat distanceBetweenPoints (CGPoint first, CGPoint second); |
19 CGFloat angleBetweenPoints(CGPoint first, CGPoint second); |
23 CGFloat angleBetweenPoints(CGPoint first, CGPoint second); |
20 CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint lin2End); |
24 CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint line2End); |