Plot[-Abs[Sin[x]]+2x*Floor[x/Pi]-Floor[x/Pi]*(Floor[x/Pi]+1)*Pi, {x, -10, 10}]