I don't see any reference to standard trig functions (Sine, Cosine, Tangent) in the SWIFT language reference. What is the recommended way to add them? Are there libraries that should be loaded?
You can still use them as global functions as defined in the Darwin module (imported automatically with Foundation)
import Darwin
var num = CDouble(10)
sin(num)
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more