Plot[-Sign[Sin[x]]*Cos[x]+2Floor[x/Pi],{x, -10, 10}]