Skip to content

Commit

Permalink
group all constants together that short-circuit wobble, #108
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 21, 2024
1 parent b9e6a83 commit b414928
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/common/model/KinematicCompass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ import ConstantDtClock from './ConstantDtClock.js';
// See https://github.com/phetsims/faradays-electromagnetic-lab/issues/67
const MAX_FIELD_MAGNITUDE = 10;

// Increase this to make the compass more sensitive to smaller fields.
const SENSITIVITY = 0.01;

// Increase this to make the needle wobble less.
const DAMPING = 0.08;

// Maximum difference between the needle and field angles at which the needle can snap to the field angle.
// See https://github.com/phetsims/faradays-electromagnetic-lab/issues/108
const ANGULAR_DISPLACEMENT_THRESHOLD = Utils.toRadians( 0.01 );
Expand All @@ -47,6 +41,12 @@ const ANGULAR_DISPLACEMENT_THRESHOLD = Utils.toRadians( 0.01 );
// See https://github.com/phetsims/faradays-electromagnetic-lab/issues/108
const ANGULAR_VELOCITY_THRESHOLD = Utils.toRadians( 0.5 );

// Increase this to make the compass more sensitive to smaller fields.
const SENSITIVITY = 0.01;

// Increase this to make the needle wobble less.
const DAMPING = 0.08;

type SelfOptions = EmptySelfOptions;

type KinematicCompassOptions = SelfOptions & CompassOptions;
Expand Down

0 comments on commit b414928

Please sign in to comment.