Trigonometry and Double Algebra