diff --git a/AppKit/CPProgressIndicator.j b/AppKit/CPProgressIndicator.j index c75ef0d66..7f9b9afb4 100644 --- a/AppKit/CPProgressIndicator.j +++ b/AppKit/CPProgressIndicator.j @@ -461,7 +461,7 @@ var CPProgressIndicatorSpinningStyleColors = []; { var midX = CGRectGetMidX(rect), midY = CGRectGetMidY(rect), - endAngle = Math.PI * 2 * ([self doubleValue] / ([self maxValue] - [self minValue])) - Math.PI / 2, + endAngle = Math.PI * 2 * (([self doubleValue] - [self minValue]) / ([self maxValue] - [self minValue])) - Math.PI / 2, radius = MIN(rect.size.width / 2, rect.size.height / 2) CGContextBeginPath(context); diff --git a/Tests/Manual/CPProgressIndicator/AppController.j b/Tests/Manual/CPProgressIndicator/AppController.j index 643ecd1c5..410a94614 100644 --- a/Tests/Manual/CPProgressIndicator/AppController.j +++ b/Tests/Manual/CPProgressIndicator/AppController.j @@ -36,7 +36,10 @@ [fiftyPercentBar setDoubleValue:50]; [hundredPercentBar setDoubleValue:100]; - [twentyPercentCircular setDoubleValue:20]; + [twentyPercentCircular setMaxValue:200]; + [twentyPercentCircular setMinValue:50]; + [twentyPercentCircular setDoubleValue:80]; + [fiftyPercentCircular setDoubleValue:50]; [hundredPercentCircular setDoubleValue:100];