Skip to content

Instantly share code, notes, and snippets.

@malcommac
Created October 15, 2015 10:13
Show Gist options
  • Save malcommac/e16193e20e4db99a48ff to your computer and use it in GitHub Desktop.
Save malcommac/e16193e20e4db99a48ff to your computer and use it in GitHub Desktop.
Indicative Angle
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