docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method csum

    | Improve this Doc View Source

    csum(int2)

    Returns the horizontal sum of components of an int2 vector.

    Declaration
    public static int csum(int2 x)
    Parameters
    Type Name Description
    int2 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    int

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(int3)

    Returns the horizontal sum of components of an int3 vector.

    Declaration
    public static int csum(int3 x)
    Parameters
    Type Name Description
    int3 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    int

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(int4)

    Returns the horizontal sum of components of an int4 vector.

    Declaration
    public static int csum(int4 x)
    Parameters
    Type Name Description
    int4 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    int

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(uint2)

    Returns the horizontal sum of components of a uint2 vector.

    Declaration
    public static uint csum(uint2 x)
    Parameters
    Type Name Description
    uint2 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    uint

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(uint3)

    Returns the horizontal sum of components of a uint3 vector.

    Declaration
    public static uint csum(uint3 x)
    Parameters
    Type Name Description
    uint3 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    uint

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(uint4)

    Returns the horizontal sum of components of a uint4 vector.

    Declaration
    public static uint csum(uint4 x)
    Parameters
    Type Name Description
    uint4 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    uint

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(float2)

    Returns the horizontal sum of components of a float2 vector.

    Declaration
    public static float csum(float2 x)
    Parameters
    Type Name Description
    float2 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    float

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(float3)

    Returns the horizontal sum of components of a float3 vector.

    Declaration
    public static float csum(float3 x)
    Parameters
    Type Name Description
    float3 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    float

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(float4)

    Returns the horizontal sum of components of a float4 vector.

    Declaration
    public static float csum(float4 x)
    Parameters
    Type Name Description
    float4 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    float

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(double2)

    Returns the horizontal sum of components of a double2 vector.

    Declaration
    public static double csum(double2 x)
    Parameters
    Type Name Description
    double2 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    double

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(double3)

    Returns the horizontal sum of components of a double3 vector.

    Declaration
    public static double csum(double3 x)
    Parameters
    Type Name Description
    double3 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    double

    The horizontal sum of of components of the vector.

    | Improve this Doc View Source

    csum(double4)

    Returns the horizontal sum of components of a double4 vector.

    Declaration
    public static double csum(double4 x)
    Parameters
    Type Name Description
    double4 x

    The vector to use when computing the horizontal sum.

    Returns
    Type Description
    double

    The horizontal sum of of components of the vector.

    • Improve this Doc
    • View Source
    In This Article
    Back to top
    Copyright © 2026 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)