function y = evalPiecewiseQuad(th, a, b, c, th_m)
y = zeros(size(th));
rear = th <= th_m;
y(rear) = a(1) .* th(rear) .^ 2 + b(1) .* th(rear) + c(1);
y(~rear) = a(2) .* th(~rear) .^ 2 + b(2) .* th(~rear) + c(2);
end
