diff -r 601158aaa201 -r 89908847b155 cocoaTouch/otherSrc/CGPointUtils.c --- a/cocoaTouch/otherSrc/CGPointUtils.c Sat Jan 30 01:46:23 2010 +0000 +++ b/cocoaTouch/otherSrc/CGPointUtils.c Sat Jan 30 18:23:42 2010 +0000 @@ -17,24 +17,20 @@ CGFloat deltaX = second.x - first.x; CGFloat deltaY = second.y - first.y; return sqrt(deltaX*deltaX + deltaY*deltaY ); -}; +} CGFloat angleBetweenPoints(CGPoint first, CGPoint second) { CGFloat height = second.y - first.y; CGFloat width = first.x - second.x; CGFloat rads = atan(height/width); return radiansToDegrees(rads); - //degs = degrees(atan((top - bottom)/(right - left))) } CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint line2End) { - CGFloat a = line1End.x - line1Start.x; CGFloat b = line1End.y - line1Start.y; CGFloat c = line2End.x - line2Start.x; CGFloat d = line2End.y - line2Start.y; - CGFloat rads = acos(((a*c) + (b*d)) / ((sqrt(a*a + b*b)) * (sqrt(c*c + d*d)))); - return radiansToDegrees(rads); }