     }
     open var percent: CGFloat {
         get {
-            return (endAngle - CGFloat(M_PI+M_PI_2))/CGFloat(M_PI*2)
+            return (endAngle - CGFloat(Double.pi + Double.pi/2)) / CGFloat(Double.pi*2)
         }
         set {
-            let angle = (newValue >= 1) ? CGFloat(3*M_PI+M_PI_2) : (CGFloat(M_PI+M_PI_2) + newValue*CGFloat(M_PI*2))
+            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
         }
     }

    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

     - parameter strokeCircle: A boolean used to decide if the inner and outer circle should be drawn.
     */
    public convenience init(center: CGPoint, radius: CGFloat, percent: CGFloat, color: UIColor, strokeCircle: Bool) {
        let endAngle = (percent >= 1) ? CGFloat(3*Double.pi + Double.pi/2) : (CGFloat(Double.pi + Double.pi/2) + percent*CGFloat(Double.pi*2))
        
        self.init(center: center,
                  innerRadius: radius*0.33,
                  outerRadius: radius,
                  startAngle: CGFloat(Double.pi + Double.pi/2),
                  endAngle: endAngle,
                  color: color,
                  strokeInnerCircle: strokeCircle,
