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.

  • david@feddit.uk
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year 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.