equal
deleted
inserted
replaced
22 #import <CoreGraphics/CoreGraphics.h> |
22 #import <CoreGraphics/CoreGraphics.h> |
23 |
23 |
24 #define degreesToRadians(x) ( M_PI * x / 180.0) |
24 #define degreesToRadians(x) ( M_PI * x / 180.0) |
25 #define radiansToDegrees(x) (180.0 * x / M_PI ) |
25 #define radiansToDegrees(x) (180.0 * x / M_PI ) |
26 |
26 |
27 #define HWX(x) (int)(x-screen.size.height/2)/HW_zoomFactor() |
27 #define HWX(x) (int)(x-screen.size.width/2)/HW_zoomFactor() |
28 #define HWY(x) (int)(screen.size.width-x)/HW_zoomFactor() + (IS_IPAD()?40:17.5)*HW_zoomLevel()/HW_zoomFactor() |
28 #define HWY(x) (int)(screen.size.height-x)/HW_zoomFactor()+(IS_IPAD()?40:17.5)*HW_zoomLevel()/HW_zoomFactor() |
29 |
29 |
30 #define HWXZ(x) (int)(x-screen.size.height/2) |
30 #define HWXZ(x) (int)(x-screen.size.width/2) |
31 #define HWYZ(x) (int)(screen.size.width-x) |
31 #define HWYZ(x) (int)(screen.size.height-x) |
32 |
32 |
33 CGFloat distanceBetweenPoints (CGPoint first, CGPoint second); |
33 CGFloat distanceBetweenPoints (CGPoint first, CGPoint second); |
34 CGFloat angleBetweenPoints(CGPoint first, CGPoint second); |
34 CGFloat angleBetweenPoints(CGPoint first, CGPoint second); |
35 CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint line2End); |
35 CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint line2End); |
36 |
36 |