-
-
Save sturdysturge/1005a1dde1ebed70140eb0e3dedaafdd to your computer and use it in GitHub Desktop.
X and Y multiplied 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
extension CGRect { | |
func xMultiplied(by multiplier: CGFloat) -> CGFloat { | |
return self.width * multiplier | |
} | |
func yMultiplied(by multiplier: CGFloat) -> CGFloat { | |
return self.height * multiplier | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment