submitted 3 years ago* (last edited 3 years ago) by to c/godot@programming.dev
 

As in, for any two Transform3D objects A and B i might encounter does Godot (4.1) always return A * B == B * A as true? Alternatively is it approximately commutative, ie (A * B).is_equal_approx(B * A), in case there are situations where floating point imprecision messes the exact equality up.

you are viewing a single comment's thread
view the rest of the comments
[–] 5 points 3 years ago

No.

If you rotate 180 degrees about the x axis and then 180 degrees about the line y=x, you get a rotation anticlockwise by 90 degrees about the z axis.

If you do it the other way round, the rotation is the opposite direction (clockwise).

They only commute in quite specific circumstances.

  • source