A piecewise-defined function is defined as,
\({\rm{f}}\left( {\rm{x}} \right) = \left\{ {\begin{array}{*{20}{c}} { - 1}&{{\rm{if}}}&{{\rm{x}} \le 0}\\ {{\rm{ax}} + {\rm{b}}}&{{\rm{if}}}&{0 < {\rm{x}} < 1}\\ 1&{{\rm{if}}}&{{\rm{x}} \ge 1} \end{array}} \right.\);
Where a, and b are constants. The function is continuous everywhere. What is the value of a?
1
-1
2
1
3
0
4
2