docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method sincos

    sincos(float, out float, out float)

    Returns the sine and cosine of the input float value x through the out parameters s and c.

    Declaration
    public static void sincos(float x, out float s, out float c)
    Parameters
    Type Name Description
    float x

    Input angle in radians.

    float s

    Output sine of the input.

    float c

    Output cosine of the input.

    Remarks

    When Burst compiled, his method is faster than calling sin() and cos() separately.

    sincos(float2, out float2, out float2)

    Returns the componentwise sine and cosine of the input float2 vector x through the out parameters s and c.

    Declaration
    public static void sincos(float2 x, out float2 s, out float2 c)
    Parameters
    Type Name Description
    float2 x

    Input vector containing angles in radians.

    float2 s

    Output vector containing the componentwise sine of the input.

    float2 c

    Output vector containing the componentwise cosine of the input.

    Remarks

    When Burst compiled, his method is faster than calling sin() and cos() separately.

    sincos(float3, out float3, out float3)

    Returns the componentwise sine and cosine of the input float3 vector x through the out parameters s and c.

    Declaration
    public static void sincos(float3 x, out float3 s, out float3 c)
    Parameters
    Type Name Description
    float3 x

    Input vector containing angles in radians.

    float3 s

    Output vector containing the componentwise sine of the input.

    float3 c

    Output vector containing the componentwise cosine of the input.

    Remarks

    When Burst compiled, his method is faster than calling sin() and cos() separately.

    sincos(float4, out float4, out float4)

    Returns the componentwise sine and cosine of the input float4 vector x through the out parameters s and c.

    Declaration
    public static void sincos(float4 x, out float4 s, out float4 c)
    Parameters
    Type Name Description
    float4 x

    Input vector containing angles in radians.

    float4 s

    Output vector containing the componentwise sine of the input.

    float4 c

    Output vector containing the componentwise cosine of the input.

    Remarks

    When Burst compiled, his method is faster than calling sin() and cos() separately.

    sincos(double, out double, out double)

    Returns the sine and cosine of the input double value x through the out parameters s and c.

    Declaration
    public static void sincos(double x, out double s, out double c)
    Parameters
    Type Name Description
    double x

    Input angle in radians.

    double s

    Output sine of the input.

    double c

    Output cosine of the input.

    Remarks

    When Burst compiled, his method is faster than calling sin() and cos() separately.

    sincos(double2, out double2, out double2)

    Returns the componentwise sine and cosine of the input double2 vector x through the out parameters s and c.

    Declaration
    public static void sincos(double2 x, out double2 s, out double2 c)
    Parameters
    Type Name Description
    double2 x

    Input vector containing angles in radians.

    double2 s

    Output vector containing the componentwise sine of the input.

    double2 c

    Output vector containing the componentwise cosine of the input.

    Remarks

    When Burst compiled, his method is faster than calling sin() and cos() separately.

    sincos(double3, out double3, out double3)

    Returns the componentwise sine and cosine of the input double3 vector x through the out parameters s and c.

    Declaration
    public static void sincos(double3 x, out double3 s, out double3 c)
    Parameters
    Type Name Description
    double3 x

    Input vector containing angles in radians.

    double3 s

    Output vector containing the componentwise sine of the input.

    double3 c

    Output vector containing the componentwise cosine of the input.

    Remarks

    When Burst compiled, his method is faster than calling sin() and cos() separately.

    sincos(double4, out double4, out double4)

    Returns the componentwise sine and cosine of the input double4 vector x through the out parameters s and c.

    Declaration
    public static void sincos(double4 x, out double4 s, out double4 c)
    Parameters
    Type Name Description
    double4 x

    Input vector containing angles in radians.

    double4 s

    Output vector containing the componentwise sine of the input.

    double4 c

    Output vector containing the componentwise cosine of the input.

    Remarks

    When Burst compiled, his method is faster than calling sin() and cos() separately.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)