nl_tokens: FUNCTION randn ( length ) Creates an array of standard normal random variates using the Box - Mueller transform .
pl_tokens: function randn ( <mask> ) { var urand , vrand , vec = [ ] , numValues = length || 1 ; for ( var i = 0 ; i < numValues ; i ++ ) { urand = Math . random ( ) ; vrand = Math . random ( ) ; vec . push ( Math . sqrt ( - 2 * Math . log ( urand ) ) * Math . cos ( 2 * Math . PI * vrand ) ) ; } if ( numValues === 1 ) { return vec [ 0 ] ; } return vec ; }