Update distanceInFeet setter and initializers for Building and Person structures.

This commit is contained in:
fechin committed 2023-03-01 09:16:49 +08:00
1 parent 63ab8a1d0e
commit b8266df823
1 file changed
+3 -3
+3 -3
View File
@@ -274,7 +274,7 @@ var distanceInFeet: Float {
distanceInMeters *3.28
}
set(newDistance) {
distanceInMeters = newDistance /3.28
distanceInMeters = newDistance /3.28
}
}
@@ -1307,7 +1307,7 @@ structure
struct Building {
var address: String
var floors: Int
init(address: String, floors: Int) {
init(address: String, floors: Int) {
self.address = address
self. floors = floors
}
@@ -1342,7 +1342,7 @@ struct Person {
var age: Int
init(name: String, age: Int) {
self.name = name
self.name = name
self. age = age
}
}