Created
October 15, 2015 10:13
-
-
Save malcommac/e16193e20e4db99a48ff to your computer and use it in GitHub Desktop.
Indicative Angle
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
public static func indicativeAngle(points: [StrokePoint]) -> Double { | |
let centroid = StrokePoint.centroid(points) | |
return atan2(centroid.y - points.first!.y, centroid.x - points.first!.x) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment