From: Matthias Baas <matthias.baas@gm...>  20080819 21:22:16

Myrek wrote: > podstawa1.rot = mat3.fromEulerXYZ (0, 0, radians (300)) > > and it's ok: > > >>> Podstawa1.rot > (0.5, 0.866025, 0) > (0.866025, 0.5, 0) > (0, 0, 1) > > But I wants back to read about how many degrees is rotate: > > >>> ile = degrees (podstawa1.rot.toEulerXYZ () [2]) > >>> Print ile > 60.0 > > Provides 60 instead of 300, why? Well, because there is a bug in the code (or rather, I have been too naive when writing that code). Thanks for reporting this! I will look into it. Having said that, note that in general, it is not guaranteed that toEuler*() will return exactly the same values as you were using for constructing the matrix. It will only return values that would produce the same matrix again (which currently is not the case because of that bug). In the above case, you might probably get 60 instead of 300. In the general case, you may also get an entirely different set of angles that just happens to describe the same rotation. So if your application needs to be able to extract the original angles again, you may be better off storing them explicitly somewhere.  Matthias  