Function

vvcosisinf(_:_:_:)

Calculates the cosine and sine of each element in an array of single-precision values.

Declaration

func vvcosisinf(_: OpaquePointer, _: UnsafePointer<Float>, _: UnsafePointer<Int32>)

Parameters

parameter 1

The output array, y.

parameter 2

The input array, x.

parameter 3

The number of elements in the arrays.

Discussion

This function calculates the complex number on the unit circle corresponding to the angle given by each element of a vector.

The following code shows an example of using vvcosisinf(_:_:_:).

struct FloatComplex {
    public var real: Float
    public var imag: Float
} 
 
let pi = Float.pi
var x: [Float] = [-pi * 0.5, 0, pi * 0.5]
let y = [FloatComplex](repeating: FloatComplex(real: 0, imag: 0), 
                       count: x.count)
var n = Int32(x.count)
 
vvcosisinf(OpaquePointer(y), &x, &n)

On return, for each array element in y, real is the cosine of x and imag is the sine of x.

See Also

Array-Oriented Trigonometric Functions

static func acos<U>(U) -> [Double]

Returns the arccosine of each element in a vector of double-precision values.

static func acos<U>(U) -> [Float]

Returns the arccosine of each element in a vector of single-precision values.

static func acos<U, V>(U, result: inout V)

Calculates the arccosine of each element in a vector of double-precision values.

static func acos<U, V>(U, result: inout V)

Calculates the arccosine of each element in a vector of single-precision values.

static func asin<U>(U) -> [Double]

Returns the arcsine of each element in a vector of double-precision values.

static func asin<U>(U) -> [Float]

Returns the arcsine of each element in a vector of single-precision values.

static func asin<U, V>(U, result: inout V)

Calculates the arcsine of each element in a vector of double-precision values.

static func asin<U, V>(U, result: inout V)

Calculates the arcsine of each element in a vector of single-precision values.

static func atan<U>(U) -> [Double]

Returns the arctangent of each element in a vector of double-precision values.

static func atan<U>(U) -> [Float]

Returns the arctangent of each element in a vector of single-precision values.

static func atan<U, V>(U, result: inout V)

Calculates the arctangent of each element in a vector of double-precision values.

static func atan<U, V>(U, result: inout V)

Calculates the arctangent of each element in a vector of single-precision values.

static func cos<U>(U) -> [Double]

Returns the cosine of each element in a vector of double-precision values.

static func cos<U>(U) -> [Float]

Returns the cosine of each element in a vector of single-precision values.

static func cos<U, V>(U, result: inout V)

Calculates the cosine of each element in a vector of double-precision values.

static func cos<U, V>(U, result: inout V)

Calculates the cosine of each element in a vector of single-precision values.

static func cosPi<U>(U) -> [Double]

Returns the cosine of pi, multiplied by each element in a vector of double-precision values.

static func cosPi<U>(U) -> [Float]

Returns the cosine of pi, multiplied by each element in a vector of single-precision values.

static func cosPi<U, V>(U, result: inout V)

Calculates the cosine of pi, multiplied by each element in a vector of double-precision values.

static func cosPi<U, V>(U, result: inout V)

Calculates the cosine of pi, multiplied by each element in a vector of single-precision values.

static func sin<U>(U) -> [Double]

Returns the sine of each element in a vector of double-precision values.

static func sin<U>(U) -> [Float]

Returns the sine of each element in a vector of single-precision values.

static func sin<U, V>(U, result: inout V)

Calculates the sine of each element in a vector of double-precision values.

static func sin<U, V>(U, result: inout V)

Calculates the sine of each element in a vector of single-precision values.

static func sinPi<U>(U) -> [Double]

Returns the sine of pi, multiplied by each element in a vector of double-precision values.

static func sinPi<U>(U) -> [Float]

Returns the sine of pi, multiplied by each element in a vector of single-precision values.

static func sinPi<U, V>(U, result: inout V)

Calculates the sine of pi, multiplied by each element in a vector of double-precision values.

static func sinPi<U, V>(U, result: inout V)

Calculates the sine of pi, multiplied by each element in a vector of single-precision values.

static func sincos<T, U, V>(T, sinResult: inout U, cosResult: inout V)

Calculates the sine and cosine of each element in a vector of double-precision values.

static func sincos<T, U, V>(T, sinResult: inout U, cosResult: inout V)

Calculates the sine and cosine of each element in a vector of double-precision values.

static func tan<U>(U) -> [Double]

Returns the tangent of each element in a vector of double-precision values.

static func tan<U>(U) -> [Float]

Returns the tangent of each element in a vector of single-precision values.

static func tan<U, V>(U, result: inout V)

Calculates the tangent of each element in a vector of double-precision values.

static func tan<U, V>(U, result: inout V)

Calculates the tangent of each element in a vector of single-precision values.

static func tanPi<U>(U) -> [Double]

Returns the tangent of pi, multiplied by each element in a vector of double-precision values.

static func tanPi<U>(U) -> [Float]

Returns the tangent of pi, multiplied by each element in a vector of single-precision values.

static func tanPi<U, V>(U, result: inout V)

Calculates the tangent of pi, multiplied by each element in a vector of double-precision values.

static func tanPi<U, V>(U, result: inout V)

Calculates the tangent of pi, multiplied by each element in a vector of single-precision values.

func vvsin(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the sine of each element in an array of double-precision values.

func vvsinf(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the sine of each element in an array of single-precision values.

func vvsinpi(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the sine of pi multiplied by each element in an array of double-precision values.

func vvsinpif(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the sine of pi multiplied by each element in an array of single-precision values.

func vvcos(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the cosine of each element in an array of double-precision values.

func vvcosf(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the cosine of each element in an array of single-precision values.

func vvcospi(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the cosine of pi multiplied by each element in an array of double-precision values.

func vvcospif(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the cosine of pi multiplied by each element in an array of single-precision values.

func vvcosisin(OpaquePointer, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the cosine and sine of each element in an array of double-precision values.

func vvsincos(UnsafeMutablePointer<Double>, UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the cosine and sine of each element in an array of double-precision values.

func vvsincosf(UnsafeMutablePointer<Float>, UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the cosine and sine of each element in an array of single-precision values.

func vvtan(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the tangent of each element in an array of double-precision values.

func vvtanf(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the tangent of each element in an array of single-precision values.

func vvtanpi(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the tangent of pi multiplied by each element in an array of double-precision values.

func vvtanpif(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the tangent of pi multiplied by each element in an array of single-precision values.

func vvasin(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the arcsine of each element in an array of double-precision values.

func vvasinf(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the arcsine of each element in an array of single-precision values.

func vvacos(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the arccosine of each element in an array of double-precision values.

func vvacosf(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the arccosine of each element in an array of single-precision values.

func vvatan(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the arctangent of each element in an array of double-precision values.

func vvatanf(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the arctangent of each element in an array of single-precision values.

func vvatan2(UnsafeMutablePointer<Double>, UnsafePointer<Double>, UnsafePointer<Double>, UnsafePointer<Int32>)

Calculates the arctangent of each pair of elements in two arrays of double-precision values.

func vvatan2f(UnsafeMutablePointer<Float>, UnsafePointer<Float>, UnsafePointer<Float>, UnsafePointer<Int32>)

Calculates the arctangent of each pair of elements in two arrays of single-precision values.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software