Processors

Static Class in Zigurous.Math

Declaration

public static class Processors

Description

Functions for processing input values.

Static Methods

AbsReturns the absolute value of the input.
AxisDeadzoneAn 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.
CeilRounds the input up to the nearest whole number.
ClampClamps the input to the range [min..max].
Clamp01Clamps the input to the range [0..1].
DecayDecays the input back to zero over time at a given rate. The rate is multiplied by Time.deltaTime.
FloorRounds the input down to the nearest whole number.
InvertInverts the input by multiplying by -1.
NormalizeNormalizes the input value in the range [min..max] to unsigned normalized form [0..1] if the min is >= zero, and to signed normalized form [-1..1] if the min is < zero.
RoundRounds the input to the nearest whole number.
ScaleMultiplies the input by a factor.
StickDeadzoneA stick deadzone scales the input such that any value with a magnitude smaller than the min results in (0,0), and any value with a magnitude greater than the max is normalized to unit length (1).
WrapWraps 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.
Wrap01Wraps 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.