Class Saturater
- Namespace
- NominalSystems.Maths
- Assembly
- NominalSystems.Maths.dll
This module is used to apply a saturation on a set of data
public class Saturater
- Inheritance
-
Saturater
Constructors
Saturater(int)
Constructor with a specific size
public Saturater(int size)
Parameters
size
intThe size of the saturater
Methods
Saturate(Vector)
Saturates the given unsaturated states
public Vector Saturate(Vector unsaturatedStates)
Parameters
unsaturatedStates
VectorA vector of the unsaturated states
Returns
- Vector
A vector with values capped at the upper and lower bounds
Saturate(Vector2)
Saturates the given unsaturated states
public Vector2 Saturate(Vector2 unsaturatedStates)
Parameters
unsaturatedStates
Vector2A vector of the unsaturated states
Returns
- Vector2
A vector with values capped at the upper and lower bounds
Saturate(Vector3)
Saturates the given unsaturated states
public Vector3 Saturate(Vector3 unsaturatedStates)
Parameters
unsaturatedStates
Vector3A vector of the unsaturated states
Returns
- Vector3
A vector with values capped at the upper and lower bounds
Saturate(Vector4)
Saturates the given unsaturated states
public Vector4 Saturate(Vector4 unsaturatedStates)
Parameters
unsaturatedStates
Vector4A vector of the unsaturated states
Returns
- Vector4
A vector with values capped at the upper and lower bounds
Saturate(double, int)
Saturates the given unsaturated state at the given set. Default at first value
public double Saturate(double a, int index = 0)
Parameters
Returns
- double
The state capped at the first value of the upper or lower bounds vector otherwise returns itself
SetBounds(Vector, Vector)
Sets upper and lower bounds for each state
public void SetBounds(Vector upperBounds, Vector lowerBounds)