3547
|
1 |
/*
|
|
2 |
* CGPointUtils.h
|
|
3 |
* PinchMe
|
|
4 |
*
|
|
5 |
* Created by Jeff LaMarche on 8/2/08.
|
|
6 |
* Copyright 2008 __MyCompanyName__. All rights reserved.
|
|
7 |
*
|
|
8 |
*/
|
|
9 |
|
|
10 |
#import <CoreGraphics/CoreGraphics.h>
|
|
11 |
|
3680
|
12 |
#define degreesToRadians(x) ( M_PI * x / 180.0)
|
|
13 |
#define radiansToDegrees(x) (180.0 * x / M_PI )
|
3547
|
14 |
|
3680
|
15 |
#define HWX(x) (int)(x-screen.size.height/2)/HW_zoomFactor()
|
3996
|
16 |
#define HWY(x) (int)(screen.size.width-x)/HW_zoomFactor() + (IS_IPAD()?40:17.5)*HW_zoomLevel()/HW_zoomFactor()
|
3680
|
17 |
|
|
18 |
#define HWXZ(x) (int)(x-screen.size.height/2)
|
|
19 |
#define HWYZ(x) (int)(screen.size.width-x)
|
3551
|
20 |
|
3547
|
21 |
CGFloat distanceBetweenPoints (CGPoint first, CGPoint second);
|
|
22 |
CGFloat angleBetweenPoints(CGPoint first, CGPoint second);
|
3680
|
23 |
CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint line2End);
|