Created
March 13, 2015 17:26
-
-
Save maddiesch/c8801868aef7ab16fea4 to your computer and use it in GitHub Desktop.
Get distance between two points
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
UIKIT_EXTERN CGFloat SKYDistanceFromPointToPoint(CGPoint, CGPoint); |
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
CGFloat SKYDistanceFromPointToPoint(CGPoint one, CGPoint two) { | |
return sqrt(pow((two.x - one.x), 2.0) + pow((two.y - one.y), 2.0)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment