Untested trigonometry. Will totally work on first try