
I want to determine whether the measure of angle Q is greater than 90 degrees.

I want to determine whether the measure of angle Q is greater than 90 degrees.
Calculate as follows (in C# or any similar language):
ux = x2 - x1 ; uy = y2 - y1; // u = (ux,uy) = vector from p1 to p2
vx = x3 - x1 ; vy = y3 - y1; // v = (vx,vy) = vector from p1 to p3
d = ux*vx + uy*vy; // Dot product of u and v
So, the number $d$ is the dot product of the vectors $ \mathbf{u} =\mathbf{p}_2 - \mathbf{p}_1$ and $\mathbf{v} = \mathbf{p}_3 - \mathbf{p}_1$. If $ d<0$, then the angle between the vectors $\mathbf{u}$ and $\mathbf{v}$ is greater than 90 degrees. If you actually want to find the angle, it's a bit more work (but that's not what you asked).
Form the vectors (x3 - x1, y3 - y1) and (x2 - x1, y2 - y1) and take the dot product. The dot product, from there you can get cosine of the angle between the vectors.
Why do not trying: $$ \cos(Q), $$ if it is greater than $0$ the angle is between $0$ and $\pi/2$, otherwise it is between $\pi/2$ and $\pi$.