I managed to condense my 7 years old javascript random code for the 140byt.es contest.
Follow me (@nadende) on Twitter and visit my blog
Then you must know the answer to this question http://stackoverflow.com/questions/11798903/javascript-casts-floating-point-numbers-to-integers-without-cause