project_files/HedgewarsMobile/Classes/CGPointUtils.h
author koda
Wed, 23 Jun 2010 22:03:56 +0200
changeset 3547 02875b1145b7
parent 3546 ccf4854df294
child 3551 d4de36b3801a
permissions -rw-r--r--
i <3 mercurial
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     1
/*
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     2
 *  CGPointUtils.h
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     3
 *  PinchMe
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     4
 *
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     5
 *  Created by Jeff LaMarche on 8/2/08.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     6
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     7
 *
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     8
 */
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     9
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    10
#import <CoreGraphics/CoreGraphics.h>
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    11
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    12
#define degreesToRadian(x) (M_PI * x / 180.0)
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    13
#define radiansToDegrees(x) (180.0 * x / M_PI)
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    14
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    15
CGFloat distanceBetweenPoints (CGPoint first, CGPoint second);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    16
CGFloat angleBetweenPoints(CGPoint first, CGPoint second);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    17
CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint lin2End);