phetsims / dot

A math library with a focus on mutable and immutable linear algebra for 2D and 3D applications.
MIT License
13 stars 6 forks source link

Double check that seedrandom isn't replacing Math.random #46

Closed samreid closed 8 years ago

samreid commented 8 years ago

I tested this by running build-an-atom, which uses seedrandom. Using this code before any script runs:

  var random = Math.random;
  console.log('got math.random',random);
  window.savedRandom = random;

Then in the console after startup: image

This shows that Math is augmented with a seedrandom instance, but Math.random is unperturbed.