Having an element with the following transformation:
style="transform: rotate3d(1, 0, 0, -50deg);"
I want to be able to get the value -50
with Javascript/jQuery.
I want to get the absolute value, so if it is 370deg, i do not want to get 10, but 370.
Using $('#element').css('transform')
returns a matrix like this:
matrix3d(1, 0, 0, 0, 0, 0.642788, -0.766044, 0, 0, 0.766044, 0.642788, 0, 0, 0, 0, 1)
Which can be better represented as:
matrix3d(
1, 0, 0, 0,
0, 0.642788, -0.766044, 0,
0, 0.766044, 0.642788, 0,
0, 0, 0, 1
)
Is solving the equations the only way to get this value?
Knowing that Z =0 and X =1 as rotate3d(1, 0, 0, -50deg);
Isn't there any faster alternative to this?