Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

math.csum

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static int csum(int2 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

int The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of an int2 vector.


Declaration

public static int csum(int3 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

int The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of an int3 vector.


Declaration

public static int csum(int4 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

int The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of an int4 vector.


Declaration

public static uint csum(uint2 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

uint The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of a uint2 vector.


Declaration

public static uint csum(uint3 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

uint The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of a uint3 vector.


Declaration

public static uint csum(uint4 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

uint The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of a uint4 vector.


Declaration

public static float csum(float2 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

float The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of a float2 vector.


Declaration

public static float csum(float3 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

float The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of a float3 vector.


Declaration

public static float csum(float4 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

float The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of a float4 vector.


Declaration

public static double csum(double2 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

double The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of a double2 vector.


Declaration

public static double csum(double3 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

double The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of a double3 vector.


Declaration

public static double csum(double4 x);

Parameters

Parameter Description
x The vector to use when computing the horizontal sum.

Returns

double The horizontal sum of of components of the vector.

Description

Returns the horizontal sum of components of a double4 vector.