decorative image for this page

Skewing random numbers towards 0

29th May 2006 11:44 | Categories: Coding, HowTo

A quick way to skew random numbers towards 0 is to raise them to some powers - the higher the power, the higher the skew.

var num:Number = Math.pow( Math.random(), 2 );

this is what fritz looks like

Email | Resume

This is a post within the site. You can navigate through posts via the links labelled 'next', or click on 'search/sitemap' at the top right handside of the page to navigate more quickly.

RSS

ampersand

Fritz is an Italian chap who's been living and working in London for almost 20 years.

He's currently technical director for an integrated digital agency.

In the past he's been a chef, a musician, and author of comics.

home

Converting a collection to a JScript object in ASP

2006-05-30 13:04 | Tags HowTo, ASP

Enumerators are collections of data that can be iterated through. Although useful, they are

Skewing random numbers towards 0

2006-05-29 11:44 | Tags Coding, HowTo

A quick way to skew random numbers towards 0 is to raise them to some powers - the higher the ...

Finding files on the command line and doing something with them

2006-05-11 11:47 | Tags *NIX, HowTo

find a_directory -iname "*.zip" -exec unzip -d another_directory {} \; This will unzip all files from a_directory into another_directory find a_directory -iname ...