Skip to content

Commit

Permalink
create dotRandom and use instead of phet.joist.random, phetsims/joist…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jan 22, 2021
1 parent c326a82 commit b0c7fa4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/density/model/DensityMysteryModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

import BooleanProperty from '../../../../axon/js/BooleanProperty.js';
import dotRandom from '../../../../dot/js/dotRandom.js';
import Matrix3 from '../../../../dot/js/Matrix3.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import Enumeration from '../../../../phet-core/js/Enumeration.js';
Expand Down Expand Up @@ -150,11 +151,11 @@ class DensityMysteryModel extends DensityBuoyancyModal( DensityBuoyancyModel, Mo
];
case Mode.RANDOM:
{
const densities = phet.joist.random.shuffle( randomMaterials ).slice( 0, 5 ).map( material => material.density );
const colors = phet.joist.random.shuffle( randomColors ).slice( 0, 5 );
const densities = dotRandom.shuffle( randomMaterials ).slice( 0, 5 ).map( material => material.density );
const colors = dotRandom.shuffle( randomColors ).slice( 0, 5 );
const volumes = [
...phet.joist.random.shuffle( [ 1, 2, 3, 4, 5, 6 ].map( n => n / 1000 ) ).slice( 0, 3 ),
...phet.joist.random.shuffle( [ 7, 8, 9, 10 ].map( n => n / 1000 ) ).slice( 0, 2 )
...dotRandom.shuffle( [ 1, 2, 3, 4, 5, 6 ].map( n => n / 1000 ) ).slice( 0, 3 ),
...dotRandom.shuffle( [ 7, 8, 9, 10 ].map( n => n / 1000 ) ).slice( 0, 2 )
].sort();

const tags = [
Expand Down

0 comments on commit b0c7fa4

Please sign in to comment.