The goal is to convert Pitch , Yaw , Roll to X , Y , Z and then back.
So Angle( 0 , 0 , 0 ) would be in XYZ ( 0 , 1 , 0 ).
So Angle( 0 , 90 , 0 ) would be in XYZ ( 1 , 0 , 0 ).
So Angle( 0 , 180 , 0 ) would be in XYZ ( 0 , -1 , 0 ).
So Angle( 0 , 270, 0 ) would be in XYZ ( -1 , -1 , 0 ).
So Angle( 0 , 360, 0 ) would be in XYZ ( 0 , 1 , 0 ).
Your numbers don't make sense. How can (0,270,0) be (-1,-1,0) ?
Perhaps it is time for to go find a primer on 3D mathematics?
As for converting between them, it looks like you want to project one unit along the forward vector of the orientation and find that position.
As for reversing it, there are infinitely many orientations that can generate the forward vector.