Skip to content

VarianceNumberProperty

Overview

A Property in which the output can be variable depending on a provided function. Statistical variation is quite helpful in PhET sims to convey "real world" settings.

@author Michael Kauzmann (PhET Interactive Simulations)

Class VarianceNumberProperty

import { VarianceNumberProperty } from 'scenerystack/axon';

Constructor

new VarianceNumberProperty( value : number, computeVariance : VarianceComputer, options? : VarianceNumberPropertyOptions )

Instance Methods

getRandomizedValue() : number

Instance Properties

computeVariance : VarianceComputer | null

(readonly)

Source Code

See the source for VarianceNumberProperty.ts in the axon repository.