SWIFT trigger functions

I do not see links to standard trigger functions (Sine, Cosine, Tangent) in the SWIFT help system. What is the recommended way to add them? Are there any libraries that need to be loaded?

+4
source share
1 answer

You can still use them as global functions defined in the Darwin module (automatically imported using Foundation)

import Darwin
var num = CDouble(10)
sin(num)
+9
source

Source: https://habr.com/ru/post/1543682/


All Articles