kevinzhow

Fix warnnings

... ... @@ -69,7 +69,7 @@
_yValues = yValues;
//make the _yLabelSum value dependant of the distinct values of yValues to avoid duplicates on yAxis
int yLabelsDifTotal = [NSSet setWithArray:yValues].count;
int yLabelsDifTotal = (int)[NSSet setWithArray:yValues].count;
_yLabelSum = yLabelsDifTotal % 2 == 0 ? yLabelsDifTotal : yLabelsDifTotal + 1;
if (_yMaxValue) {
... ...
... ... @@ -138,7 +138,6 @@
for (int index = 0; index < yLabels.count; index++) {
labelText = yLabels[index];
#warning modify origin
NSInteger y = (NSInteger)(_chartCavanHeight - index * yStepHeight);
PNChartLabel *label = [[PNChartLabel alloc] initWithFrame:CGRectMake(0.0, y, (NSInteger)_chartMargin, (NSInteger)_yLabelHeight)];
... ... @@ -260,7 +259,7 @@
CGPoint p2 = [linePointsArray[i + 1] CGPointValue];
// Closest distance from point to line
float distance = fabsf(((p2.x - p1.x) * (touchPoint.y - p1.y)) - ((p1.x - touchPoint.x) * (p1.y - p2.y)));
float distance = fabs(((p2.x - p1.x) * (touchPoint.y - p1.y)) - ((p1.x - touchPoint.x) * (p1.y - p2.y)));
distance /= hypot(p2.x - p1.x, p1.y - p2.y);
if (distance <= 5.0) {
... ... @@ -292,7 +291,7 @@
CGPoint p1 = [linePointsArray[i] CGPointValue];
CGPoint p2 = [linePointsArray[i + 1] CGPointValue];
float distanceToP1 = fabsf(hypot(touchPoint.x - p1.x, touchPoint.y - p1.y));
float distanceToP1 = fabs(hypot(touchPoint.x - p1.x, touchPoint.y - p1.y));
float distanceToP2 = hypot(touchPoint.x - p2.x, touchPoint.y - p2.y);
float distance = MIN(distanceToP1, distanceToP2);
... ...