Vector3.SignedAngle changes sign for no reason

Relevant code:

Vector3 cameraRelFaceDir = Vector3.ProjectOnPlane(camera.forward, transform.up).normalized;

float anglePlayerForwCameraForw = Vector3.SignedAngle(cameraRelFaceDir, transform.forward, Vector3.forward);

Debug.Log("angle: " + anglePlayerForwCameraForw + ", transf up: " + transform.up + ", transf forw: " + transform.forward + ", camera rel dir: " + cameraRelFaceDir);

This clearly shows that it changed sign between two frames.
Debug output
(The image doesn’t seem to show up correctly so here’s the link: debug-out hosted at ImgBB — ImgBB)

I figured it out. The third parameter was wrong, since it should be a normal of the plane which the from and to vectors are on. The interesting thing is that it worked almost perfectly, except that little glitch that it sometimes changed the sign.