Skip to content

Commit

Permalink
removed p5 dependencies
Browse files Browse the repository at this point in the history
removed p5 dependencies
  • Loading branch information
rev3rend committed Jul 3, 2022
1 parent aa65062 commit d8f2307
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/p5.func.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! p5.func.js v0.4 2022-03-27 */
/*! p5.func.js v0.5 2022-07-03 */
/**
* @module p5.func
* @submodule p5.func
Expand All @@ -8,7 +8,7 @@
/**
* p5.func
* R. Luke DuBois (dubois@nyu.edu)
* Integrated Digital Media / Brooklyn Experimental Media Center
* Integrated Design & Media, Tandon School of Engineering
* New York University
* The MIT License (MIT).
*
Expand Down Expand Up @@ -227,7 +227,7 @@

// common random number distributions.
// Csound GEN21 / RTcmix GEN20, written by rld.
// if no seed, auto-generated from millis().
// if no seed, auto-generated from window.performance.now().
// algorithms adapted from dodge and jerse (1985).
// inspired by denis lorrain's
// 'a panoply of stochastic cannons' (1980):
Expand All @@ -251,7 +251,7 @@
if(!_x) // no arguments, so do linear with random seed
{
_type = 'linear';
_x = [millis()];
_x = [window.performance.now()];
u = false;
}
else if(typeof(_x)!='string') // first argument is a number, so seed
Expand All @@ -264,7 +264,7 @@
else // argument is a string, so type
{
_type=_x; // it's the type, not the seed
_x = [millis()]; // random seed
_x = [window.performance.now()]; // random seed
u = false;
}

Expand All @@ -273,7 +273,7 @@
else if(_x.constructor === Float32Array) _v = new Float32Array(_x.length);
else if(_x.constructor === Float64Array) _v = new Float64Array(_x.length);

if(_x[0]===-1) randomSeed(millis()*100000.);
if(_x[0]===-1) randomSeed(window.performance.now()*100000.);
for(var i in _x)
{
if(_x[i]!=-1) randomSeed(_x[i]*100000.);
Expand Down
Loading

0 comments on commit d8f2307

Please sign in to comment.