Skip to content

Instantly share code, notes, and snippets.

@StanDimitroff
Created February 16, 2018 10:38
Show Gist options
  • Save StanDimitroff/1fb7036acc721ed7f7fe3d47af99f083 to your computer and use it in GitHub Desktop.
Save StanDimitroff/1fb7036acc721ed7f7fe3d47af99f083 to your computer and use it in GitHub Desktop.
CGPoint scale
extension CGPoint {
func scaled(to size: CGSize) -> CGPoint {
return CGPoint(x: self.x * size.width, y: self.y * size.height)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment