Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Value

Value-object representing single value stored in memory. For example: each slider corresponds to one value.

Value allows for seamless transition between "real" and "ratio" representation.

  • Real represents value, that is between config.min and config.max limit, and it is the value end user is interested in.
  • Ratio represents value relative to config.min and config.max limit: between 0 and 1. It is used mostly internally for computations of slider position and so on.

Hierarchy

  • Value

Index

Methods

  • asRatio(): number
  • asReal(): number
  • changeReal(real: number): Value
  • clampReal(min: number, max: number): Value
  • Limit this value to min-max range (real)

    Parameters

    • min: number
    • max: number

    Returns Value

  • isExact(value: Value): boolean

Generated using TypeDoc