Skip to content

Rotation3::from_matrix hangs when a matrix with left handed coordinate system is passed in #1583

@kalmjasper

Description

@kalmjasper

When passing in a matrix with a left handed coordinate system (negative determinant) the Rotation3::from_matrix deadlocks. Running this code never exits:

        let rot = Rotation3::from_matrix(&Matrix3::new(
            0.7071067811865477,
            0.7071067811865475,
            0.0,
            -0.7071067811865475,
            0.7071067811865475,
            0.0,
            0.0,
            0.0,
            -1.0,
        ));

It would be nice if the code can at least panic / raise an error in another way / not deadlock when the algorithm won't converge.

Tested on nalgebra 0.34.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions