How to find angle of rotation of photoshop layer

When using the Photoshop API to work with layers, getting the rotation angle directly from the layer information isn’t straightforward. The API typically doesn’t include rotation data in its basic layer details. The only information that was received was a transformation matrix which was obtained using a plugin called Alchemist. How can we find the rotation angle using this transformation matrix?
Does anyone has insights or experience with using batchPlay commands or other techniques to retrieve rotation angle in degrees of a layer through the Photoshop API ? Your input would be greatly appreciated!