Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilJay committed Aug 14, 2016
2 parents e710d16 + 83b8242 commit 4190a7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,11 @@ public boolean onTouch(View v, MotionEvent event) {
if (mChart.isPinchZoomEnabled()) {
mTouchMode = PINCH_ZOOM;
} else {
if (mSavedXDist > mSavedYDist)
mTouchMode = X_ZOOM;
else
mTouchMode = Y_ZOOM;
if (mChart.isScaleXEnabled() != mChart.isScaleYEnabled()) {
mTouchMode = mChart.isScaleXEnabled() ? X_ZOOM : Y_ZOOM;
} else {
mTouchMode = mSavedXDist > mSavedYDist ? X_ZOOM : Y_ZOOM;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ protected void drawDataSet(Canvas c, IPieDataSet dataSet) {
int visibleAngleCount = 0;
for (int j = 0; j < entryCount; j++) {
// draw only if the value is greater than zero
if ((Math.abs(dataSet.getEntryForIndex(j).getY()) > 0.000001)) {
if ((Math.abs(dataSet.getEntryForIndex(j).getY()) > Utils.FLOAT_EPSILON)) {
visibleAngleCount++;
}
}
Expand All @@ -244,7 +244,7 @@ protected void drawDataSet(Canvas c, IPieDataSet dataSet) {
Entry e = dataSet.getEntryForIndex(j);

// draw only if the value is greater than zero
if ((Math.abs(e.getY()) > 0.000001)) {
if ((Math.abs(e.getY()) > Utils.FLOAT_EPSILON)) {

if (!mChart.needsHighlight(j)) {

Expand All @@ -265,7 +265,7 @@ protected void drawDataSet(Canvas c, IPieDataSet dataSet) {

float arcStartPointX = 0.f, arcStartPointY = 0.f;

if (sweepAngleOuter % 360f < Utils.FLOAT_EPSILON) {
if (sweepAngleOuter % 360f <= Utils.FLOAT_EPSILON) {
// Android is doing "mod 360"
mPathBuffer.addCircle(center.x, center.y, radius, Path.Direction.CW);
} else {
Expand Down Expand Up @@ -771,7 +771,7 @@ public void drawHighlighted(Canvas c, Highlight[] indices) {
int visibleAngleCount = 0;
for (int j = 0; j < entryCount; j++) {
// draw only if the value is greater than zero
if ((Math.abs(set.getEntryForIndex(j).getY()) > 0.000001)) {
if ((Math.abs(set.getEntryForIndex(j).getY()) > Utils.FLOAT_EPSILON)) {
visibleAngleCount++;
}
}
Expand Down Expand Up @@ -958,7 +958,7 @@ protected void drawRoundedSlices(Canvas c) {
Entry e = dataSet.getEntryForIndex(j);

// draw only if the value is greater than zero
if ((Math.abs(e.getY()) > 0.000001)) {
if ((Math.abs(e.getY()) > Utils.FLOAT_EPSILON)) {

float x = (float) ((r - circleRadius)
* Math.cos(Math.toRadians((angle + sliceAngle)
Expand Down

0 comments on commit 4190a7e

Please sign in to comment.