Yeah, I've just realised that was wrong though. Looking at a geo chart you can't assume there is a right angle made between the distance between the rear axle to the top of head tube, and the top of head tube to front axle. The point where you can make a right angle is off in space somewhere, which means to maintain the right angle the length from that point to the front axle will probably change when you change the head angle. This means the adjacent side isn't a constant, thus you can't use the simple trig calculation above.
It'll be in the ball park, but given the angles of a bike there's a lot of unknowns at the moment to make the exact calculation.