Convert radians to degrees

 Problem

I want to convert radians to degrees.



 Recipe



// Declare radiansToDegrees function
func radiansToDegrees (radians: Double)->Double {
    return radians * 180 / M_PI
}

// Get degrees for radians
var degrees = radiansToDegrees(1)
print(degrees)
				


 Playground