Authored by Taylor Malloy

Fixes RMShape bezier drawing for below iOS 6.

I just changed use of NAN to INFINITY, which is available in
earlier versions of iOS.
@@ -309,11 +309,11 @@ @@ -309,11 +309,11 @@
309 309
310 if (isDrawing) 310 if (isDrawing)
311 { 311 {
312 - if (isnan(controlPoint1.x) && isnan(controlPoint2.x)) 312 + if (controlPoint1.x == (double)INFINITY && controlPoint2.x == (double)INFINITY)
313 { 313 {
314 [bezierPath addLineToPoint:CGPointMake(point.x, -point.y)]; 314 [bezierPath addLineToPoint:CGPointMake(point.x, -point.y)];
315 } 315 }
316 - else if (isnan(controlPoint2.x)) 316 + else if (controlPoint2.x == (double)INFINITY)
317 { 317 {
318 controlPoint1.x = controlPoint1.x - projectedLocation.x; 318 controlPoint1.x = controlPoint1.x - projectedLocation.x;
319 controlPoint1.y = controlPoint1.y - projectedLocation.y; 319 controlPoint1.y = controlPoint1.y - projectedLocation.y;
@@ -348,8 +348,8 @@ @@ -348,8 +348,8 @@
348 - (void)moveToProjectedPoint:(RMProjectedPoint)projectedPoint 348 - (void)moveToProjectedPoint:(RMProjectedPoint)projectedPoint
349 { 349 {
350 [self addCurveToProjectedPoint:projectedPoint 350 [self addCurveToProjectedPoint:projectedPoint
351 - controlPoint1:RMProjectedPointMake((double)NAN, (double)NAN)  
352 - controlPoint2:RMProjectedPointMake((double)NAN, (double)NAN) 351 + controlPoint1:RMProjectedPointMake((double)INFINITY, (double)INFINITY)
  352 + controlPoint2:RMProjectedPointMake((double)INFINITY, (double)INFINITY)
353 withDrawing:NO]; 353 withDrawing:NO];
354 } 354 }
355 355
@@ -368,8 +368,8 @@ @@ -368,8 +368,8 @@
368 - (void)addLineToProjectedPoint:(RMProjectedPoint)projectedPoint 368 - (void)addLineToProjectedPoint:(RMProjectedPoint)projectedPoint
369 { 369 {
370 [self addCurveToProjectedPoint:projectedPoint 370 [self addCurveToProjectedPoint:projectedPoint
371 - controlPoint1:RMProjectedPointMake((double)NAN, (double)NAN)  
372 - controlPoint2:RMProjectedPointMake((double)NAN, (double)NAN) 371 + controlPoint1:RMProjectedPointMake((double)INFINITY, (double)INFINITY)
  372 + controlPoint2:RMProjectedPointMake((double)INFINITY, (double)INFINITY)
373 withDrawing:YES]; 373 withDrawing:YES];
374 } 374 }
375 375
@@ -419,7 +419,7 @@ @@ -419,7 +419,7 @@
419 { 419 {
420 [self addCurveToProjectedPoint:projectedPoint 420 [self addCurveToProjectedPoint:projectedPoint
421 controlPoint1:controlProjectedPoint 421 controlPoint1:controlProjectedPoint
422 - controlPoint2:RMProjectedPointMake((double)NAN, (double)NAN) 422 + controlPoint2:RMProjectedPointMake((double)INFINITY, (double)INFINITY)
423 withDrawing:YES]; 423 withDrawing:YES];
424 } 424 }
425 425