         path.fill()
         
         if strokeInnerCircle {
-            let inner = UIBezierPath(arcCenter: center, radius: innerRadius, startAngle: 0, endAngle: CGFloat(M_PI)*2, clockwise: true)
-            inner.addArc(withCenter: center, radius: innerRadius + strokeWidth, startAngle: CGFloat(M_PI)*2, endAngle: 0, clockwise: false)
+            let inner = UIBezierPath(arcCenter: center, radius: innerRadius, startAngle: 0, endAngle: CGFloat(Double.pi)*2, clockwise: true)
+            inner.addArc(withCenter: center, radius: innerRadius + strokeWidth, startAngle: CGFloat(Double.pi)*2, endAngle: 0, clockwise: false)
             inner.fill()
         }
         if strokeOuterCircle {
-            let outer = UIBezierPath(arcCenter: center, radius: outerRadius, startAngle: 0, endAngle: CGFloat(M_PI)*2, clockwise: true)
-            outer.addArc(withCenter: center, radius: outerRadius - strokeWidth, startAngle: CGFloat(M_PI)*2, endAngle: 0, clockwise: false)
+            let outer = UIBezierPath(arcCenter: center, radius: outerRadius, startAngle: 0, endAngle: CGFloat(Double.pi)*2, clockwise: true)
+            outer.addArc(withCenter: center, radius: outerRadius - strokeWidth, startAngle: CGFloat(Double.pi)*2, endAngle: 0, clockwise: false)
             outer.fill()
         }
         

    open var color: UIColor = UIColor.clear
    open var innerRadius: CGFloat = 0
    open var outerRadius: CGFloat = 0
    open var startAngle: CGFloat = CGFloat(M_PI+M_PI_2)
    open var endAngle: CGFloat = 0
    open var strokeInnerCircle: Bool = false
    open var strokeOuterCircle: Bool = false

    }
    open var percent: CGFloat {
        get {
            return (endAngle - CGFloat(Double.pi + Double.pi/2)) / CGFloat(Double.pi*2)
        }
        set {
            let angle = (newValue >= 1) ? CGFloat(3*Double.pi + Double.pi/2) : (CGFloat(Double.pi + Double.pi/2) + newValue*CGFloat(Double.pi*2))
            self.endAngle = angle
        }
    }
