Skip to content

Instantly share code, notes, and snippets.

@petrosDemetrakopoulos
Created February 15, 2021 08:58
Show Gist options
  • Save petrosDemetrakopoulos/dfc894cf0be20189e88e653fe4b43d43 to your computer and use it in GitHub Desktop.
Save petrosDemetrakopoulos/dfc894cf0be20189e88e653fe4b43d43 to your computer and use it in GitHub Desktop.
getAngle function
func getAngle(angle: Double) -> Double {
let deg = 360 - angle.truncatingRemainder(dividingBy: 360)
return deg
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment