Skip to content

RangeWithValue

Overview

A numeric range with a required default value.

@author Chris Malley (PixelZoom, Inc.) @author Chris Klusendorf (PhET Interactive Simulations)

Class RangeWithValue

import { RangeWithValue } from 'scenerystack/dot';

Constructor

new RangeWithValue( min : number, max : number, defaultValue : number )

Instance Methods

getDefaultValue() : number

Getter for defaultValue

setMin( min : number )

Setter for min

setMax( max : number )

Setter for max

setMinMax( min : number, max : number ) : this

Setter for min and max

toString() : string

Converts the attributes of this range to a string

equals( object : IntentionalAny ) : boolean

Determines if this RangeWithValue is equal to some object.

Source Code

See the source for RangeWithValue.ts in the dot repository.