blob: ac8eb1724bb9e1e743a4ffe92650ebfc68e40eb5 [file] [log] [blame]
#if BEFORE
public struct ChangeStoredToComputed {
public init() {
celsius = 0
}
public var celsius: Int
public var fahrenheit: Int {
get {
return (celsius * 9) / 5 + 32
}
set {
celsius = ((newValue - 32) * 5) / 9
}
}
}
#else
public struct ChangeStoredToComputed {
public init() {
fahrenheit = 32
}
public var celsius: Int {
get {
return ((fahrenheit - 32) * 5) / 9
}
set {
fahrenheit = (newValue * 9) / 5 + 32
}
}
public var fahrenheit: Int = 32
}
#endif