Processors.Wrap

Static Method in Processors

Declaration

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

Description

Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.

Parameters

inputThe input value to wrap.
minThe minimum value of the range.
maxThe maximum value of the range.

Returns

float

Overload

Declaration

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

Description

Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.

Parameters

inputThe input value to wrap.
minThe minimum value of the range.
maxThe maximum value of the range.

Returns

double

Overload

Declaration

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

Description

Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.

Parameters

inputThe input value to wrap.
minThe minimum value of the range.
maxThe maximum value of the range.

Returns

int

Overload

Declaration

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

Description

Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.

Parameters

inputThe input value to wrap.
minThe minimum value of the range.
maxThe maximum value of the range.

Returns

Vector2

Overload

Declaration

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

Description

Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.

Parameters

inputThe input value to wrap.
minThe minimum value of the range.
maxThe maximum value of the range.

Returns

Vector2Int

Overload

Declaration

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

Description

Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.

Parameters

inputThe input value to wrap.
minThe minimum value of the range.
maxThe maximum value of the range.

Returns

Vector3

Overload

Declaration

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

Description

Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.

Parameters

inputThe input value to wrap.
minThe minimum value of the range.
maxThe maximum value of the range.

Returns

Vector3Int

Overload

Declaration

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

Description

Wraps the input to the range [min..max]. If the value exceeds the max it wraps around to the min, and if the value is less than the min it wraps back to max.

Parameters

inputThe input value to wrap.
minThe minimum value of the range.
maxThe maximum value of the range.

Returns

Vector4