Closed KatieWoe closed 1 year ago
the electricPotentialSensor.electricPotentialProperty is going infinite (as it is supposed to) but the NumberProperty does not support infinity. It's unclear if we can tell the NumberProperty to allow InfiniteNumberIO or if we should use Property.
This patch demonstrates how to reliably trigger the error on startup as well as a NumberProperty hack to solve the problem. I would like to check in with @zepumph about if/how NumberProperty should support infinity.
Alternatively we could use Property
like this:
this.electricPotentialProperty = new Property( 0, {
tandem: tandem.createTandem( 'electricPotentialProperty' ),
units: 'V',
phetioReadOnly: true,
phetioValueType: InfiniteNumberIO
} );
Let's check in with @zepumph next.
@marlitas @jonathanolson and I decided to go with that last idea. We feel it is good and NumberProperty does not need to have abstraction around infinity. Closing.