# Calculate the angle between a side of a quadrilateral and its diagonal

Given two adjacent sides and all four angles of a quadrilateral, what is the most efficient way to calculate the angle that is made between a side and the diagonal of the quadrilateral that crosses (but does not necessarily bisect) the angle in between the two known sides?

Other known information:

• The two angles that touch one and only one known side are right angles.
• The angle that touches both known sides equals $n-m$
• The angle that doesn't touch any known sides equals $180-n+m$, which can be inferred through the above statement and the rule that states that the interior angles of a quadrilateral must add up to $360$, although this is also known from other aspects of the broader problem
• $n$ and $m$ cannot easily be explained with words. See the picture at the end of this post.

From what I can tell, the most efficient solution to this problem is to solve for the OTHER diagonal using the law of cosines and the two known sides $x$ and $y$ from the sketch, use the law of sines and/or cosines to solve for the parts of angles $A$ and $C$ that make up the left-most triangle made by the other diagonal, find the other parts of angles $A$ and $C$ by using $90-A$ and $90-C$, respectively, since $A$ and $C$ are both right angles, then use the law of sines once more to find sides $AB$ and $BC$, and FINALLY use the law of sines to find any of the four thetas. Seems tedious. Am I missing something?

Here is an awful sketch I made of the problem: Le us assume that $D$ lies at the origin and $\widehat{CDA}=\theta$. Then the coordinates of $A$ are $(x\cos\theta,x\sin\theta)$ and the line through $A$ which is orthogonal to $DA$ has equation $y(t)=-\frac{\cos\theta}{\sin\theta}t+\left(x\sin\theta+x\frac{\cos^2\theta}{\sin\theta}\right)$. It follows that the length of $CB$ is given by $$-\frac{\cos\theta}{\sin\theta} y + \left(x\sin\theta+x\frac{\cos^2\theta}{\sin\theta}\right)=\frac{x-y\cos\theta}{\sin\theta}$$ and by symmmetry the length of $AB$ is given by $\frac{y-x\cos\theta}{\sin\theta}$.
Well, your quadrilateral can be inscribed inside a circle, since the sum of opposite angles is 180, so the angle $\theta_1$ is equal to the angle $ACD$, that can be computed through 1 cosine rule and 1 sine rule.