Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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