Transformation Matrix

There is no perfect way. For example, certain scale operations rotation operations can cause the scale and rotation components of the transform will become mixed.

Here are a couple of sample routines I wrote some time ago. They are fairly rudimentary. If you know that your transform only has particular types of component transforms inside it and if you’re willing to accept the fact that you won’t get an exact version of those transforms back after decomposition, they might work for you.