       self.drawBackgroundCircle(true)
       
       let rotationAnimation : CABasicAnimation = CABasicAnimation(keyPath: "transform.rotation.z")
-      rotationAnimation.toValue = NSNumber(value: M_PI * 2.0 as Double)
+      rotationAnimation.toValue = NSNumber(value: .pi * 2.0)
       rotationAnimation.duration = 1;
       rotationAnimation.isCumulative = true;
       rotationAnimation.repeatCount = HUGE;

    }
    
    fileprivate func drawBackgroundCircle(_ partial : Bool) {
      let startAngle : CGFloat = CGFloat(M_PI) / CGFloat(2.0)
      var endAngle : CGFloat = (2.0 * CGFloat(M_PI)) + startAngle
      
      let center : CGPoint = CGPoint(x: self.bounds.size.width / 2, y: self.bounds.size.height / 2)
      let radius : CGFloat = (CGFloat(self.bounds.size.width) - CGFloat(self.lineWidth!)) / CGFloat(2.0)

      processBackgroundPath.lineWidth = CGFloat(self.lineWidth!)
      
      if (partial) {
        endAngle = (1.8 * .pi) + startAngle
      }
      
      processBackgroundPath.addArc(withCenter: center, radius: radius, startAngle: startAngle, endAngle: endAngle, clockwise: true)
