Processors.AxisDeadzone

Static Method in Processors

Declaration

public static float AxisDeadzone(float input, float min = 0.125F, float max = 0.925F)

Description

An axis deadzone scales the input such that any value with an absolute value smaller than the min is 0, and any value with an absolute value larger than the max is 1 or -1.

Parameters

inputThe input value to scale.
minThe lower deadzone threshold.
maxThe upper deadzone threshold.

Returns

floatThe scaled input value.

Overload

Declaration

public static double AxisDeadzone(double input, double min = 0.125, double max = 0.925)

Description

An axis deadzone scales the input such that any value with an absolute value smaller than the min is 0, and any value with an absolute value larger than the max is 1 or -1.

Parameters

inputThe input value to scale.
minThe lower deadzone threshold.
maxThe upper deadzone threshold.

Returns

doubleThe scaled input value.