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

math.min

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 min(int x, int y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

int The minimum of the two input values.

Description

Returns the minimum of two int values.


Declaration

public static int2 min(int2 x, int2 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

int2 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two int2 vectors.


Declaration

public static int3 min(int3 x, int3 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

int3 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two int3 vectors.


Declaration

public static int4 min(int4 x, int4 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

int4 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two int4 vectors.


Declaration

public static uint min(uint x, uint y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

uint The minimum of the two input values.

Description

Returns the minimum of two uint values.


Declaration

public static uint2 min(uint2 x, uint2 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

uint2 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two uint2 vectors.


Declaration

public static uint3 min(uint3 x, uint3 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

uint3 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two uint3 vectors.


Declaration

public static uint4 min(uint4 x, uint4 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

uint4 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two uint4 vectors.


Declaration

public static long min(long x, long y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

long The minimum of the two input values.

Description

Returns the minimum of two long values.


Declaration

public static ulong min(ulong x, ulong y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

ulong The minimum of the two input values.

Description

Returns the minimum of two ulong values.


Declaration

public static float min(float x, float y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

float The minimum of the two input values.

Description

Returns the minimum of two float values.


Declaration

public static float2 min(float2 x, float2 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

float2 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two float2 vectors.


Declaration

public static float3 min(float3 x, float3 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

float3 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two float3 vectors.


Declaration

public static float4 min(float4 x, float4 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

float4 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two float4 vectors.


Declaration

public static double min(double x, double y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

double The minimum of the two input values.

Description

Returns the minimum of two double values.


Declaration

public static double2 min(double2 x, double2 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

double2 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two double2 vectors.


Declaration

public static double3 min(double3 x, double3 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

double3 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two double3 vectors.


Declaration

public static double4 min(double4 x, double4 y);

Parameters

Parameter Description
x The first input value.
y The second input value.

Returns

double4 The componentwise minimum of the two input values.

Description

Returns the componentwise minimum of two double4 vectors.