Criterion for lines being in the same half-plane I stumbled upon this question while trying to solve another geometric problem. Consider a cartesian plane with three half-lines $l_1,l_2,l_3 $ starting at $(0,0)$ at angles $\theta_1,\theta_2,\theta_3$. The angle of a half-line is defined as the angle spanned by a ccw rotation of the positive x-axis until it reaches the half-line, therefore for every angle $\theta$ of a half-line $l$ starting at $(0,0)$ we have that $\theta \in [0,2\pi)$. 
Consider the question of whether there exists a line $l$ through $(0,0)$ such that the lines $l_1,l_2,l_3$ are in the same half-plane with respect to $l$. I suppose there has to be some easy criterion to determine that however I'm having some trouble finding it. I would appreciate any help.
 A: This happens if and only if the numbers $$\sin(\theta_2-\theta_1),\, \sin(\theta_3-\theta_2),\, \sin(\theta_1-\theta_3)$$ are neither all positive nor all negative.
This can be seen as follows. Take points $(\cos(\theta_k), \sin(\theta_k))$ for $k\in\{1,2,3\}$. Then these points lie not in the same half-plane if and only if the origin lies in the interior of the convex hull of these points. This happens exactly if the coordinates of the cross-product of $(\cos(\theta_1), \cos(\theta_2), \cos(\theta_3))$ and $(\sin(\theta_1), \sin(\theta_2), \sin(\theta_3))$ are either all positive or all negative. Writing out this cross-product and simplifying with trigonometric identities leads to the criterion above.
A: If the angle $\theta_l$ defines the half line $l$, then we have $\theta_{l1} = \theta_l-\pi/2$ and $\theta_{l2} = \theta_l+\pi/2$
If some of those angles is $<0$ or $>2\pi$ then adjust it to $[0,2\pi]$ range.
Let's assume $\theta_{l1} < \theta_{l2}$
Knowing if a given half line $l_i$ with angle $\theta_i$ is in the same half plane as the line $l$ is easy by just comparing:
$$\theta_{l1} <= \theta_l <= \theta_{l2}$$
