Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Last active December 31, 2020 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sturdysturge/1005a1dde1ebed70140eb0e3dedaafdd to your computer and use it in GitHub Desktop.
Save sturdysturge/1005a1dde1ebed70140eb0e3dedaafdd to your computer and use it in GitHub Desktop.
X and Y multiplied extension
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