My trig knowledge is old and rusty so given a known width $x$ and height $y$ and the width of the brace $w$, how would I calculate for $θ_2$ given the unknown value of $z$?
The $x$ and $y$ values can vary so I need an equation I can plug the values in to find $θ$ and the minimum length of the diagonal brace for cutting at the correct angle and length respectively.
EDIT: Thanks for all the help. I found a diagram which allows me to get the perfect cut angle and length quickly here: http://homesteadlaboratory.blogspot.com/2014/06/gate-brace-math.html
$w$ = width of brace
$h$ = length of dashed line $= \sqrt{y^2+x^2}$
$\theta_1 = \arcsin\left(\dfrac{y}{h}\right)$
$\theta_2 - \theta_1 = \arcsin\left(\dfrac{w}{h}\right)$
$\theta_2 = \theta_1 + \arcsin\left(\frac{w}{h}\right)$
Works perfectly every time.