fritz stelluto
development for digital media
berlin, london

Skewing random numbers towards 0HowTo

A quick way to skew random numbers towards 0 is to raise them to some powers - the higher the power, the higher the skew. Obviously not the most efficient way of doing it, but could be useful in certain occasions where performance is not an issue.
var num:Number = Math.pow( Math.random(), 2 );

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strong>