Weird equation array error

When I use the following code to generate a simple equation array:

$$f(x)=\left \{\begin{array}{ll} \frac{\pi-x}{2},\quad 0<x\leqslant 2\pi;\\ -\frac{\pi}{2},\quad x \text{are other points} \end{array} \right.$$


I got the following result:

Why the array overlaps a little bit? Is there anything wrong with the code?

I know I can use a \nicefrac{}{} to change the second line, but still weird:

How would you guys generate a beautiful bracket at left in math mode?

Thanks.

Insert a larger line-break using \\[<len>]. Using the cases would require the same increased line-break. However, using dcases (from mathtools) works better:

\documentclass{article}

\usepackage{mathtools,amssymb}

\begin{document}

$$f(x) = \left \{\begin{array}{ll} \frac{\pi-x}{2},\quad 0<x\leqslant 2\pi;\\ -\frac{\pi}{2},\quad x \text{are other points} \end{array} \right.$$

$$f(x) = \begin{cases} \dfrac{\pi-x}{2}, & 0 < x \leqslant 2\pi; \\[2\jot] -\dfrac {\pi} {2}, & \text{x are other points} \end{cases}$$

$$f(x) = \begin{dcases} \frac{\pi-x}{2}, & 0 < x \leqslant 2\pi; \\ -\frac {\pi} {2}, & \text{x are other points} \end{dcases}$$

\end{document}