Show:

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 Number

    minimum input value

  • inMax Number

    maximum input value

  • outMin Number

    minimum output value

  • outMax Number

    maximum output value

  • type Function

    The function used to map the input curve

  • limiter Boolean

    Whether or not to restrict the input value if it exceeds the specified range.

Item Index

Methods

processSample

(
  • val
)
Number protected

Process the value to be filtered and return the filtered result.

Parameters:

  • val Number

    The 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)