Created
August 2, 2021 20:03
-
-
Save ajjames/09d0e2b83fe21cba0a644ac662ced471 to your computer and use it in GitHub Desktop.
Common Float Extension
This file contains 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 Float { | |
var toOneDecimalPlace: String { String(format: "%.1f", self) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment