Last active
August 10, 2020 12:11
-
-
Save foxicode/797ea63c6fa672900bb15040e6d3d2a8 to your computer and use it in GitHub Desktop.
Converting cents to dollars
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 | |
| extension Int { | |
| func centsToDollars() -> Double { | |
| Double(self) / 100 | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment