Skip to content

Commit

Permalink
Add issue references, see #123
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Mar 26, 2024
1 parent 1852909 commit f9cb296
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/common/model/ACPowerSupply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const MAX_VOLTAGE = 110; // V
const MAX_VOLTAGE_PERCENT_RANGE = new Range( 0, 100 ); // %

// REVIEW - Could 100 be replaced by MAX_VOLTAGE_PERCENT_RANGE.getLength()?
// @samreid - Improvements to Range?
// REVIEW - Consider a Range method for this, see https://github.com/phetsims/faradays-electromagnetic-lab/issues/123
const MAX_VOLTAGE_RANGE = new Range( ( MAX_VOLTAGE_PERCENT_RANGE.min / 100 ) * MAX_VOLTAGE, ( MAX_VOLTAGE_PERCENT_RANGE.max / 100 ) * MAX_VOLTAGE );

// Change in angle per step when frequency is 100%. Increase the denominator to slow the oscillation.
Expand Down
1 change: 1 addition & 0 deletions js/common/model/BarMagnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const MAX_STRENGTH = FELConstants.MAGNET_STRENGTH_RANGE.max; // G
const STRENGTH_PERCENT_RANGE = new Range( 0, 100 ); // %

// REVIEW - Is this equivalent to FELConstants.MAGNET_STRENGTH_RANGE?
// REVIEW - If not, consider a Range method for this, see https://github.com/phetsims/faradays-electromagnetic-lab/issues/123
// REVIEW - Should this use STRENGTH_PERCENT_RANGE.getLength()?
const STRENGTH_RANGE = new Range( ( STRENGTH_PERCENT_RANGE.min / 100 ) * MAX_STRENGTH, ( STRENGTH_PERCENT_RANGE.max / 100 ) * MAX_STRENGTH ); // G

Expand Down
1 change: 1 addition & 0 deletions js/common/model/Coil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export default class Coil extends PhetioObject {
phetioDocumentation: hasFixedLoopArea ? 'Loop area is fixed.' : 'To change loop area, use loopAreaPercentProperty.'
} );

// REVIEW - Consider a Range method for this, see https://github.com/phetsims/faradays-electromagnetic-lab/issues/123
this.loopRadiusRange = new Range(
Math.sqrt( ( this.loopAreaPercentProperty.range.min / 100 ) * options.maxLoopArea / Math.PI ),
Math.sqrt( ( this.loopAreaPercentProperty.range.max / 100 ) * options.maxLoopArea / Math.PI )
Expand Down
1 change: 1 addition & 0 deletions js/generator/model/Turbine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default class Turbine extends PhetioObject {
} );

// REVIEW - Would using flowRateRange.length be more robust than 100?
// REVIEW - Consider a Range method for this, see https://github.com/phetsims/faradays-electromagnetic-lab/issues/123
const rpmRange = new Range( ( flowRateRange.min / 100 ) * MAX_RPM, ( flowRateRange.max / 100 ) * MAX_RPM );
this.rpmProperty = new DerivedProperty( [ this.waterFaucet.flowRateProperty, this.dragFactorProperty ],
( flowRate, dragFactor ) => ( 1 - dragFactor ) * ( flowRate / 100 ) * MAX_RPM, {
Expand Down

0 comments on commit f9cb296

Please sign in to comment.