Skip to content

Commit

Permalink
Add review comments for BlochSphere component models, see: #109
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Feb 17, 2025
1 parent 8aa5b3c commit 2a6fe61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/common/model/AbstractBlochSphere.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export type AbstractBlochSphereOptions = SelfOptions & PickRequired<PhetioObject

export default abstract class AbstractBlochSphere extends PhetioObject {

// REVIEW: Perhaps this is my lack of content understanding, but this documentation seems confusing. The sentence
// starts with "Angles" yet this is not an array. Do multiple angles determine the calculation of the azimuthal angle?
// Maybe clarify what knowledge a developer needs to have about azimuthal angles in implementation-notes.md and keep this
// documentation specific to the Property itself.
// Angles that determine the direction the vector representation is pointing at azimuthal angle, measured along the XY
// plane from the +X axis, goes from 0 to 2*PI in radians.
public readonly azimuthalAngleProperty: NumberProperty;
Expand All @@ -44,6 +48,7 @@ export default abstract class AbstractBlochSphere extends PhetioObject {

super( options );

// REVIEW: Document why the azimuthal and polar angles are reentrant and how we know that they will not hit an infinite loop
this.azimuthalAngleProperty = new NumberProperty( options.initialAzimuthalAngle, {
range: new Range( 0, 2 * Math.PI ),
tandem: options.tandem.createTandem( 'azimuthalAngleProperty' ),
Expand Down

0 comments on commit 2a6fe61

Please sign in to comment.