Question: I am trying to convert this `Obj-C` code to `Swift` code but I don't know what the equivalent of this code should be ?

```
#define DEGREES_TO_RADIANS(degrees)((M_PI * degrees)/180)

```

I googled and found [this](https://stackoverflow.com/questions/24325477/how-to-use-a-objective-c-define-from-swift)

But I don't understand how to convert that in Swift in my case?

Answer: 
Also, to convert fron radians to degrees (if anyone stumbles upon this on google):

```
var degrees = radians * (180.0 / M_PI)

```
If it is ok to import `SwiftUI` or if you are already using it you could use the `Angle` type to convert between angle units, eg.:

```
import SwiftUI

let radians = Angle(degrees: 45).radians

```

This will convert from `Double` to `Double`.