Table of Contents

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 int

The size of the saturater

Methods

Saturate(Vector)

Saturates the given unsaturated states

public Vector Saturate(Vector unsaturatedStates)

Parameters

unsaturatedStates Vector

A 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 Vector2

A 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 Vector3

A 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 Vector4

A 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

a double

A unsaturated state

index int

the index of the upper and lower bounds array

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)

Parameters

upperBounds Vector

States for the upper bounds

lowerBounds Vector

States for the lower bounds