Skip to content

Instantly share code, notes, and snippets.

@filsv
Last active May 28, 2018 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filsv/89819f4ebbd6c1c4e0efb0f48b638372 to your computer and use it in GitHub Desktop.
Save filsv/89819f4ebbd6c1c4e0efb0f48b638372 to your computer and use it in GitHub Desktop.
Degrees <=> Radians
class DegreesRadiansHelper {
static func deg2Rad(_ degrees: Double) -> Double {
return degrees * .pi / 180
}
static func rad2Deg(_ radians: Double) -> Double {
return radians * 180.0 / .pi
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment