Scrapped old implementation

Trigonometry was failing me. Changed to using dot product. Now passing
all tests.