import '../../globals.js';
// Copyright 2022-2024, University of Colorado Boulder
/**
 * 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)
 */
import axon from './axon.js';
import NumberProperty from './NumberProperty.js';
export default class VarianceNumberProperty extends NumberProperty {
    constructor(value, computeVariance, options) {
        super(value, options);
        this.computeVariance = computeVariance;
    }
    getRandomizedValue() {
        return this.computeVariance ? this.computeVariance(super.get()) : this.get();
    }
}
axon.register('VarianceNumberProperty', VarianceNumberProperty);
//# sourceMappingURL=VarianceNumberProperty.js.map