Quick loop random question

It appears the same rotation for every brach.
Is this not the correct way to randomize a loop?

for (var i:Number=0; i<branchAmount; i++) {

                branch.graphics.lineStyle(1, 0x333333,1);
                branch.graphics.moveTo(0,0);
                branch.graphics.lineTo(0,-50);
                branch.x=trunks.x;
                branch.y=trunks.y;
                branch.rotation=Math.floor(Math.random()*160)-90;
                branchArray.push(branch);
                addChild(branch);
            }