How can use CGFloat in Swift?
cgfloat, swift
Solution
Use `CGFloat(number)` instead of `Float(number)`
pipeDown.position = CGPointMake(0.0, CGFloat(posinonY))
Problem
``` var posinonY:Float = Float(y) + Float(pipeDown.size.height) + Float(verticalPipeGap) pipeDown.position = CGPointMake(0.0, Float(posinonY)) ``` I get this error: "NSNumber' is not a subtype of 'CGFloat'" Why? Edit: CGFLoat need double type ``` pipeDown.position = CGPointMake(0.0, Double(posinonY)) ``` this is ok.