The Math Behind Joint Angle Calculation (why atan2 works)
The math behind atan2d(det, dot): the determinant is the cross-product magnitude (|a||b|sin), the dot product is |a||b|cos, so their ratio is tan – and why the two-argument atan2 preserves sign and handles angles beyond 90 degrees.
