Sines 2

Hi

The following code generates sine results from 0 to 1 from 100 loops

How to I change it to generate the following 4 results

a)0 to 1 to 0

and

b)-1 to 0 to 1

and

c)-1 to 0 to 1 to 0 to -1

and

d) 1 to 0

from 100 loops

Here’s the code

//100 loops to produce sin results from 0 to 1;
var loopCount=0;
var desiredLoops=100;
for (var i:Number=0;i<=Math.PI/2;i+= Math.PI/(desiredLoops*2)){
trace("loopCount = "+loopCount);
trace("Sin = "+Math.sin(i));
loopCount++;
}