function theta=angp(SIGxx,SIGyy,SIGxy) % function angp. Calculates a principal stress orientation theta = 0.5*atan2(SIGxy,(SIGxx-SIGyy)/2);