未验证 提交 e33457c5 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #16576 from Mugen87/dev30

Examples: Remove PRNG.js
// Park-Miller-Carta Pseudo-Random Number Generator
// https://github.com/pnitsch/BitmapData.js/blob/master/js/BitmapData.js
var PRNG = function () {
this.seed = 1;
this.next = function() {
return ( this.gen() / 2147483647 );
};
this.nextRange = function( min, max ) {
return min + ( ( max - min ) * this.next() )
};
this.gen = function() {
return this.seed = ( this.seed * 16807 ) % 2147483647;
};
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册