Skip to content

Instantly share code, notes, and snippets.

@nafferro
Created April 24, 2019 11:10
Show Gist options
  • Select an option

  • Save nafferro/4e7538669bc2bd6b635a9985d43ba03f to your computer and use it in GitHub Desktop.

Select an option

Save nafferro/4e7538669bc2bd6b635a9985d43ba03f to your computer and use it in GitHub Desktop.
Convert degrees to semicircle
func convertDegreesToSemicircle (degrees: Double) -> Int32 {
return Int32(degrees * (pow(2.0, 31.0) / 180))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment