Last active
May 28, 2018 19:55
-
-
Save filsv/89819f4ebbd6c1c4e0efb0f48b638372 to your computer and use it in GitHub Desktop.
Degrees <=> Radians
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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