Swift Compiler error: 'Double' is not convertible to CGFloat
You can convert it with CGFloat(M_PI)
.
For example the following code should work in your case (note the use of CGFloat
)
let action = SKAction.rotateByAngle(CGFloat(M_PI), duration:1)
You can convert it with CGFloat(M_PI)
.
For example the following code should work in your case (note the use of CGFloat
)
let action = SKAction.rotateByAngle(CGFloat(M_PI), duration:1)