blob: c59c2e81262a8d82121d294e35d1f1938c1a083b [file] [log] [blame]
#if BEFORE
public class 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 class 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