I am attempting to calculate the rotation of points in JavaScript, and am finding the values to be in the ballpark of 1% off (and always at about the correct angle, but 1% close