Note that the from

to 0, that is the left part, the function is the line y=1.
Similarly, from 0 (not included) to

, the function is y=-1.
Thus the function is given by the rule:
y=1, for x≤0,
y=-1, for x>0.
Remark: a horizontal line at height c, from the x-axis, is the graph of the function y=c.