Processors.Wrap01

Extension Method in Processors

Declaration

public static float Wrap01(this float input)

Description

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

Parameters

inputThe input value to wrap.

Returns

floatThe wrapped value.

Overload

Declaration

public static int Wrap01(this int input)

Description

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

Parameters

inputThe input value to wrap.

Returns

intThe wrapped value.