project_files/HedgewarsMobile/Classes/CGPointUtils.h
author koda
Sun, 25 Jul 2010 01:59:41 +0200
changeset 3668 3f7a95234d8a
parent 3551 d4de36b3801a
child 3680 aaf832c6fbd7
permissions -rw-r--r--
tap to play piano notes, fix for audio and pause glitch

/*
 *  CGPointUtils.h
 *  PinchMe
 *
 *  Created by Jeff LaMarche on 8/2/08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */

#import <CoreGraphics/CoreGraphics.h>

#define degreesToRadian(x)  (M_PI * x / 180.0)
#define radiansToDegrees(x) (180.0 * x / M_PI)

#define HWX(x) (int)(x-screen.size.height/2)
#define HWY(x) (int)(screen.size.width-x)

CGFloat distanceBetweenPoints (CGPoint first, CGPoint second);
CGFloat angleBetweenPoints(CGPoint first, CGPoint second);
CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint lin2End);