News for hackers. Stuff that matters.
Re:Sin and Cos: The Programmer's Pals by jjaredsimpson on Tuesday March 06, 2018 @01:54PM (#16531030)
All triangles are 2d. Using atan2 to find the angle between 3d vectors would require projection onto an orthonormal basis.

atan2 requires this even in 2d, we just assume the natural basis and assume the other vector is x hat.

Dot product avoids all this in any dimension.

Re:Sin and Cos: The Programmer's Pals by paulddraper on Wednesday March 07, 2018 @06:50PM (#16541069)
Just as atan2() returns 1 angle (XY), atan3() would return 2 angles (XY, XZ).

I agree dot product is often better, for other reasons.

Re:Sin and Cos: The Programmer's Pals by jjaredsimpson on Wednesday March 07, 2018 @07:59PM (#16541383)
I don't follow what this hypothetical atan3 implements?