project_files/HedgewarsMobile/Classes/CGPointUtils.h
changeset 3551 d4de36b3801a
parent 3547 02875b1145b7
child 3680 aaf832c6fbd7
equal deleted inserted replaced
3550:149416b948fc 3551:d4de36b3801a
     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 degreesToRadian(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 
       
    15 #define HWX(x) (int)(x-screen.size.height/2)
       
    16 #define HWY(x) (int)(screen.size.width-x)
    14 
    17 
    15 CGFloat distanceBetweenPoints (CGPoint first, CGPoint second);
    18 CGFloat distanceBetweenPoints (CGPoint first, CGPoint second);
    16 CGFloat angleBetweenPoints(CGPoint first, CGPoint second);
    19 CGFloat angleBetweenPoints(CGPoint first, CGPoint second);
    17 CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint lin2End);
    20 CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint lin2End);