๐
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| typealias UnitsDictionary = [String : Double] //ํ๋์ ๋จ์๋ฒ์ฃผ ํํ | |
| //๋จ์์ ์งํฉ ๊ตฌ์กฐ์ฒด | |
| struct Units { | |
| static let lengthDictionary : UnitsDictionary = ["cm" : 1, "m" : 100, "inch" : 2.54, "yard" : 91.44] | |
| static let weightDictionary : UnitsDictionary = ["g" : 1, "kg" : 1000, "oz" : 28.3495, "lb" : 453.592 ] | |
| static let volumeDictionary : UnitsDictionary = ["l" : 1, "pt" :0.473176, "qt" : 0.946353, "gal" : 3.78541] | |
| static let error : UnitsDictionary = ["error" : 0] | |
| } | |
| //์ ๋ ฅ๋ฐ์ ๋ฌธ์์ด์ ๋ฐฐ์ด๋ก ๋ถ๋ฆฌํ๋ ํจ์ |