BO.filters.Scaler Class
Scales up an input value from its min and max range to a specified minimum to maximum range. See Breakout/examples/filters/scaler.html for an example application.
Constructor
BO.filters.Scaler
(
-
inMin
-
inMax
-
outMin
-
outMax
-
type
-
limiter
Parameters:
-
inMin
Numberminimum input value
-
inMax
Numbermaximum input value
-
outMin
Numberminimum output value
-
outMax
Numbermaximum output value
-
type
FunctionThe function used to map the input curve
-
limiter
BooleanWhether or not to restrict the input value if it exceeds the specified range.
Item Index
Methods
- processSample
- Scaler.CUBE static
- Scaler.CUBE_ROOT static
- Scaler.LINEAR static
- Scaler.SQUARE static
- Scaler.SQUARE_ROOT static
Methods
processSample
(
Number
protected
-
val
Process the value to be filtered and return the filtered result.
Parameters:
-
val
NumberThe input value to be filtered.
Returns:
Number:
The resulting value after applying the filter.
Scaler.CUBE
()
static
y = x^4
Scaler.CUBE_ROOT
()
static
y = pow(x, 1/4)
Scaler.LINEAR
()
static
y = x
Scaler.SQUARE
()
static
y = x * x
Scaler.SQUARE_ROOT
()
static
y = sqrt(x)