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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With