Processors.Clamp

Static Method in Processors

Declaration

public static float Clamp(float input, float min, float max)

Description

Clamps the input to the range [min..max].

Parameters

inputThe input value to clamp.
minThe minimum value.
maxThe maximum value.

Returns

floatThe clamped input value.

Overload

Declaration

public static double Clamp(double input, double min, double max)

Description

Clamps the input to the range [min..max].

Parameters

inputThe input value to clamp.
minThe minimum value.
maxThe maximum value.

Returns

doubleThe clamped input value.

Overload

Declaration

public static int Clamp(int input, int min, int max)

Description

Clamps the input to the range [min..max].

Parameters

inputThe input value to clamp.
minThe minimum value.
maxThe maximum value.

Returns

intThe clamped input value.

Overload

Declaration

public static Vector2 Clamp(Vector2 input, Vector2 min, Vector2 max)

Description

Clamps the input to the range [min..max].

Parameters

inputThe input value to clamp.
minThe minimum value.
maxThe maximum value.

Returns

Vector2The clamped input value.

Overload

Declaration

public static Vector2Int Clamp(Vector2Int input, Vector2Int min, Vector2Int max)

Description

Clamps the input to the range [min..max].

Parameters

inputThe input value to clamp.
minThe minimum value.
maxThe maximum value.

Returns

Vector2IntThe clamped input value.

Overload

Declaration

public static Vector3 Clamp(Vector3 input, Vector3 min, Vector3 max)

Description

Clamps the input to the range [min..max].

Parameters

inputThe input value to clamp.
minThe minimum value.
maxThe maximum value.

Returns

Vector3The clamped input value.

Overload

Declaration

public static Vector3Int Clamp(Vector3Int input, Vector3Int min, Vector3Int max)

Description

Clamps the input to the range [min..max].

Parameters

inputThe input value to clamp.
minThe minimum value.
maxThe maximum value.

Returns

Vector3IntThe clamped input value.

Overload

Declaration

public static Vector4 Clamp(Vector4 input, Vector4 min, Vector4 max)

Description

Clamps the input to the range [min..max].

Parameters

inputThe input value to clamp.
minThe minimum value.
maxThe maximum value.

Returns

Vector4The clamped input value.