--- layout: stdlib-reference --- # sincos ## Description Sine and cosine. Calculate both the sine and cosine of x. ## Signature
void sincos<T>(
    T x,
    out T s,
    out T c)
    where T : __BuiltinFloatingPointType;

void sincos<T, int N>(
    vector<T, N> x,
    out vector<T, N> s,
    out vector<T, N> c)
    where T : __BuiltinFloatingPointType;

void sincos<T, int N, int M, int L1, int L2>(
    matrix<T, N, M> x,
    out matrix<T, N, M> s,
    out matrix<T, N, M> c)
    where T : __BuiltinFloatingPointType;

## Generic Parameters #### T: [\_\_BuiltinFloatingPointType](../interfaces/0_builtinfloatingpointtype-029hm/index.html) #### N : int #### M : int #### L1 : int #### L2 : int ## Parameters #### x : [T](sincos.html#typeparam-T) The angle in radians. #### s : [T](sincos.html#typeparam-T) \[out\] The sine of x. #### c : [T](sincos.html#typeparam-T) \[out\] The cosine of x. #### x : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\> The angle in radians. #### s : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\> \[out\] The sine of x. #### c : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\> \[out\] The cosine of x. #### x : [matrix](../types/matrix/index.html)\<[T](../types/matrix/t-0.html), [N](../types/matrix/index.html#decl-N), [M](../types/matrix/index.html#decl-M)\> The angle in radians. #### s : [matrix](../types/matrix/index.html)\<[T](../types/matrix/t-0.html), [N](../types/matrix/index.html#decl-N), [M](../types/matrix/index.html#decl-M)\> \[out\] The sine of x. #### c : [matrix](../types/matrix/index.html)\<[T](../types/matrix/t-0.html), [N](../types/matrix/index.html#decl-N), [M](../types/matrix/index.html#decl-M)\> \[out\] The cosine of x. ## Return value void ## Availability and Requirements Defined for the following targets: #### hlsl Available in all stages. #### glsl Available in all stages. #### cpp Available in all stages. #### cuda Available in all stages. #### metal Available in all stages. #### wgsl Available in all stages. #### spirv Available in all stages.