Use the ElementaryFunctions protocol for basic math functions
mainThe ElementaryFunctions protocol provides access to a wide range of mathematical building blocks, including exponential, logarithmic, trigonometric, hyperbolic, and power/root functions. Any type conforming to ElementaryFunctions makes these functions available as static methods.
Note that ElementaryFunctions conformance implies AdditiveArithmetic, so standard addition, subtraction, and the zero property are also available on these types.
let x: Float = 1
let y = Float.sin(x) // 0.84147096