In several posts post1 and post2 have been shared how to obtain a dihedral angle with four points or their two planes. But ... How can one know if that dihedral angle is positive or negative?
Calculate triple product of vectors P1P2, P2P3 and P3P4.
Sign of the value of this triple product shows handedness of vector triplet (right-handed or left-handed) and corresponds to the sign of dihedral angle