Stupid trigonometry...