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
| // main.swift | |
| // UnitConverter | |
| // | |
| import Foundation | |
| /// ์์ซ์ n์๋ฆฌ์์ ๋ฐ์ฌ๋ฆผ extension | |
| extension Double { | |
| func rounded(toPlace places: Int)-> Double { | |
| let divisor = pow(10.0, Double(places)) | |
| return (self * divisor).rounded()/divisor |
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
| // main.swift | |
| // UnitConverter | |
| // | |
| // Created by Doran & Dominic on 02/04/2019. | |
| // Copyright ยฉ 2019 hw. All rights reserved. | |
| import Foundation | |
| // ์์ซ์ n์๋ฆฌ์์ ๋ฐ์ฌ๋ฆผ extension |