Skip to content

Instantly share code, notes, and snippets.

@macbaszii
Created February 5, 2015 07:30
Show Gist options
  • Save macbaszii/4940144c3656050edc8d to your computer and use it in GitHub Desktop.
Save macbaszii/4940144c3656050edc8d to your computer and use it in GitHub Desktop.
let pi: Double = 3.14159
let fpi: Float = 3.14159
let x = Int(pi) // 3
let dpi = Double(pi)
let dgf = CGFloat(pi)
let array = Array("abc") // array = ["a", "b", "c"]
let string = String(["a", "b", "c", "d"]) // string = "abcd"
let intConvert = String(44) // let's try String(37.5)
let floatConvert = "\(37.5)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment