This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function RippleEffect(element){ | |
this.element = element; | |
this.element.addEventListener('mousedown', this.run.bind(this), false); | |
} | |
RippleEffect.prototype = { | |
run: function(event){ | |
var ripplerContainer = this.element.querySelector('.ripple-container'); | |
var offsetInfo = this.element.getBoundingClientRect(); | |
var rippleContainer = document.createElement('div'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Linear Congruential Generator | |
// Variant of a Lehman Generator | |
var lcg = (function() { | |
// Set to values from http://en.wikipedia.org/wiki/Numerical_Recipes | |
// m is basically chosen to be large (as it is the max period) | |
// and for its relationships to a and c | |
var m = 4294967296, | |
// a - 1 should be divisible by m's prime factors | |
a = 1664525, | |
// c and m should be co-prime |
NewerOlder