before adding law of cosines to find angles

just to keep a copy of the code I had before I implemented the law of
cosines instead of the non-linear mapping function that I had to use.