I need a little help with Math.random():
I have to rotate some images (with CSS3 transform (deg) )
in the way to get results from -40 to +40
but skipping results from range: -20 and +20

If I’m not wrong this will get me random results in a range from -40 to +40
var counter = Math.round(Math.random()*81)-40;
How to exclude from the results numbers between -20 and +20 ???
Modifying existing answers to give a uniform distribution range -40 to -21 and 21 to 40: