Processors
Static Class in Zigurous.Math
Declaration
public static class Processors
Description
Functions for processing input values.
Static Methods
Abs | Returns the absolute value of the input. |
AxisDeadzone | 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. |
Ceil | Rounds the input up to the nearest whole number. |
Clamp | Clamps the input to the range [min..max]. |
Clamp01 | Clamps the input to the range [0..1]. |
Decay | Decays the input back to zero over time at a given rate. The rate is multiplied by Time.deltaTime . |
Floor | Rounds the input down to the nearest whole number. |
Invert | Inverts the input by multiplying by -1. |
Normalize | Normalizes 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. |
Round | Rounds the input to the nearest whole number. |
Scale | Multiplies the input by a factor. |
StickDeadzone | A 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). |
Wrap | 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. |
Wrap01 | 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. |