Skip to content

Instantly share code, notes, and snippets.

@soggybag
Created December 6, 2015 03:20
Show Gist options
  • Save soggybag/001a1cd8da3d8b8dc7f7 to your computer and use it in GitHub Desktop.
Save soggybag/001a1cd8da3d8b8dc7f7 to your computer and use it in GitHub Desktop.
Convert Kelvin to F and C with a computed property
var tempC: Double {
get {
return temp - 273.15
}
}
var tempF: Double {
get {
return tempC * 9/5 + 32
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment