csum
Returns the horizontal sum of components of an int2 vector.
Read time 3 minutesLast updated 4 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
csum(int2)
Returns the horizontal sum of components of an int2 vector.
public static int csum(int2 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| int | The horizontal sum of of components of the vector. |
csum(int3)
Returns the horizontal sum of components of an int3 vector.
public static int csum(int3 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| int | The horizontal sum of of components of the vector. |
csum(int4)
Returns the horizontal sum of components of an int4 vector.
public static int csum(int4 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| int | The horizontal sum of of components of the vector. |
csum(uint2)
Returns the horizontal sum of components of a uint2 vector.
public static uint csum(uint2 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| uint | The horizontal sum of of components of the vector. |
csum(uint3)
Returns the horizontal sum of components of a uint3 vector.
public static uint csum(uint3 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| uint | The horizontal sum of of components of the vector. |
csum(uint4)
Returns the horizontal sum of components of a uint4 vector.
public static uint csum(uint4 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| uint | The horizontal sum of of components of the vector. |
csum(float2)
Returns the horizontal sum of components of a float2 vector.
public static float csum(float2 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| float | The horizontal sum of of components of the vector. |
csum(float3)
Returns the horizontal sum of components of a float3 vector.
public static float csum(float3 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| float | The horizontal sum of of components of the vector. |
csum(float4)
Returns the horizontal sum of components of a float4 vector.
public static float csum(float4 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| float | The horizontal sum of of components of the vector. |
csum(double2)
Returns the horizontal sum of components of a double2 vector.
public static double csum(double2 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| double | The horizontal sum of of components of the vector. |
csum(double3)
Returns the horizontal sum of components of a double3 vector.
public static double csum(double3 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| double | The horizontal sum of of components of the vector. |
csum(double4)
Returns the horizontal sum of components of a double4 vector.
public static double csum(double4 x)
Parameters
The vector to use when computing the horizontal sum.
Returns
Type | Description |
|---|---|
| double | The horizontal sum of of components of the vector. |