Skip to content

Commit

Permalink
Allcaps to camel case in variables #109
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinVallejo committed Feb 25, 2025
1 parent 9342040 commit 5c0a00f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion js/coins/model/CoinsModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default class CoinsModel implements TModel {
} );
this.quantumCoinExperimentSceneModel = new CoinsExperimentSceneModel( {
systemType: 'quantum',
initialBias: 0.5,
tandem: providedOptions.tandem.createTandem( 'quantumCoinExperimentSceneModel' )
} );

Expand Down
12 changes: 6 additions & 6 deletions js/coins/view/OutcomeProbabilityControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export default class OutcomeProbabilityControl extends VBox {

let COLOR_SPAN: ( text: string ) => string = text => text;

let BRA_KET_TITLE_STRING = `( ${ALPHA}|${UP}${KET} + ${COLOR_SPAN( BETA )}|${COLOR_SPAN( DOWN )}${KET} )`;
let MAGNITUDE_OF_BETA_SQUARED = COLOR_SPAN( `|${BETA}|<sup>2` );
let ketTitleString = `( ${ALPHA}|${UP}${KET} + ${COLOR_SPAN( BETA )}|${COLOR_SPAN( DOWN )}${KET} )`;
let magnitudeOfBetaSquared = COLOR_SPAN( `|${BETA}|<sup>2` );

Multilink.multilink(
[
Expand All @@ -64,8 +64,8 @@ export default class OutcomeProbabilityControl extends VBox {
COLOR_SPAN = ( text: string ) => {
return ProbabilityEquationsNode.COLOR_SPAN( text, systemType === 'classical' ? tailsColor : downColor );
};
BRA_KET_TITLE_STRING = `( ${ALPHA}|${UP}${KET} + ${COLOR_SPAN( BETA )}|${COLOR_SPAN( DOWN )}${KET} )`;
MAGNITUDE_OF_BETA_SQUARED = COLOR_SPAN( `|${BETA}|<sup>2` );
ketTitleString = `( ${ALPHA}|${UP}${KET} + ${COLOR_SPAN( BETA )}|${COLOR_SPAN( DOWN )}${KET} )`;
magnitudeOfBetaSquared = COLOR_SPAN( `|${BETA}|<sup>2` );
}
);

Expand All @@ -86,7 +86,7 @@ export default class OutcomeProbabilityControl extends VBox {
QuantumMeasurementColors.tailsColorProperty,
QuantumMeasurementColors.downColorProperty
],
stateToPrepareString => `<b>${stateToPrepareString}</b> ${BRA_KET_TITLE_STRING}`
stateToPrepareString => `<b>${stateToPrepareString}</b> ${ketTitleString}`
);
title = new RichText( titleStringProperty, {
font: TITLE_AND_LABEL_FONT,
Expand Down Expand Up @@ -150,7 +150,7 @@ export default class OutcomeProbabilityControl extends VBox {
QuantumMeasurementColors.downColorProperty
], ( probabilityString, probabilityOfValuePatternString ) => {
const POfV = StringUtils.fillIn( probabilityOfValuePatternString, { value: COLOR_SPAN( `<b>${QuantumMeasurementConstants.SPIN_DOWN_ARROW_CHARACTER}</b>` ) } );
return `${probabilityString} ${POfV} = ${MAGNITUDE_OF_BETA_SQUARED}`;
return `${probabilityString} ${POfV} = ${magnitudeOfBetaSquared}`;
}
);

Expand Down

0 comments on commit 5c0a00f

Please sign in to comment.