I want to rotate the arrow to any given angle. What i need to add/modify so that it can be rotated to any angle. Currently its on 180 degree.
function drawArrowAtAngle(cx,cy,angle,context){
context.save();
context.beginPath();
context.lineWidth = 1;
context.strokeStyle = '#aaa';
context.moveTo(cx+25,cx-2);
context.lineTo(cx-55,cx-2);
context.lineTo(cx-58,cx);
context.lineTo(cx-55,cx+2);
context.lineTo(cx+25,cx+2);
context.lineTo(cx+25,cx-2);
context.stroke();
context.closePath();
context.restore();
}