Thank you soooooo much Robert and Dan for making me understand the logic behind it.
And I was ae to successfully set up the rog as I wanted. Now it can loop seamlessly based in comp duration.
The only thing is the no of cycles should be even to loop seamlessly….
Thank you guys again ….????????????
Here is the code
cyc =4; // should be even for a seamless loop
segDur = thisComp.duration/cyc;
rampDur = (segDur*0.5).toFixed(2);
t = time%segDur.toFixed(2);
seg = Math.floor(time/segDur);
deg = 180;
seg*deg+linear(t,rampDur,segDur,0,deg);
Nithish