Created
Oct ’23
Replies
4
Boosts
0
Views
506
Participants
3
not in the language itself. There are trigonometric functions in the CoreGraphics framework.
This works directly in SwiftUI or playground or UIKit app as well:
let x = sin(.pi / 6)
Yes.
Just create a new project in SwiftUI:
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world! \(sin(Float.pi/3))")
}
.padding()
}
}
And get this:
Thanks allot