title: Weird casting needed in Swift
body: <p>I was watching some of the videos at WWDC2014 and trying to code I liked, but one of the weird things I noticed is that Swift keeps getting mad at me and wanting me to cast to different number types. This is easy enough but in the videos at WWDC they did NOT need to do this. Here is an example from "What's New With Interface Builder":</p>
  
  <p>-M_PI/2 keeps giving me the error: "Could not find an overload for '/' that accepts the supplied arguments'</p>
  
  <p>Does anyone have a solution to this problem, that does NOT simply involve casting because there is clearly another way of doing this? I have many many more examples for similar problems to this.</p>
  
  <pre><code>if !ringLayer {
              ringLayer = CAShapeLayer()
  
              let innerRect = CGRectInset(bounds, lineWidth / 2.0, lineWidth / 2.0)
              let innerPath = UIBezierPath(ovalInRect: innerRect)
  
              ringLayer.path = innerPath.CGPath
              ringLayer.fillColor = nil
              ringLayer.lineWidth = lineWidth
              ringLayer.strokeColor = UIColor.blueColor().CGColor
              ringLayer.anchorPoint = CGPointMake(0.5, 0.5)
              ringLayer.transform = CATransform3DRotate
                   (ringLayer.transform, -M_PI/2, 0, 0, 1)
  
              layer.addSublayer(ringLayer)
          }
          ringLayer.frame = layer.bounds
  </code></pre>