Created
February 16, 2018 10:38
-
-
Save StanDimitroff/1fb7036acc721ed7f7fe3d47af99f083 to your computer and use it in GitHub Desktop.
CGPoint scale
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 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