mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
Update distanceInFeet setter and initializers for Building and Person structures.
This commit is contained in:
1 parent
63ab8a1d0e
commit
b8266df823
1 file changed
+3
-3
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user