First, let me corrected the syntax error of enclosing Pi
in square brackets:
f[x_] := Which[
0 <= Mod[x, 2 Pi] < Pi, Mod[x, Pi],
Pi <= Mod[x, 2 Pi] < 2 Pi, Mod[-x, Pi]
]
g[x_] := Pi (1 - (-1)^Quotient[x, Pi])/2 + (-1)^Quotient[x, Pi] Mod[x, Pi]
Then, checking equality of f[x]
and g[x]
over a range of values for x:
Table[f[x], {x, -10, 10, 1/10}] == Table[g[x], {x, -10, 10, 1/10}]
(* True *)