Created
July 29, 2020 17:54
-
-
Save ha1f/d039eebdd0ee14732b7009ab829b0398 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 map(_ transform: (CGFloat) -> CGFloat) -> CGPoint { | |
CGPoint(x: transform(x), y: transform(y)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment