Constructing quaternion from matrix causes infinite loop
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 565
- PR merge metrics
- No merged PRs in 30d
Description
I have this short snippet:
```rust
let translation = mat.column(3);
let scale_rot_mat = mat.fixed_slice::<3, 3>(0, 0).clone();
let scale_x = mat.row(0).norm();
let scale_y = mat.row(1).norm();
let scale_z = mat.row(2).norm();
let normalized = scale_rot_mat.normalize();
let rotation = Quatf::from_matrix(&normalized);
```
Where mat is a homogeneous matrix with values:
```
[[1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0]]
[[1.0, 0.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 0.0, 1.0]]
[[1.0, 0.0, 0.0, 0.0], [0.0, 0.012916823, 0.99991655, 0.0], [0.0, 0.99991655, -0.012916823, 0.0], [-7.727291e-8, 0.015543158, 1.0427487, 1.0]]
[[1.0, 3.9768153e-8, -4.945398e-7, 0.0], [4.945398e-7, -0.15979563, 0.98715013, 0.0], [3.9768153e-8, 0.98715013, 0.15979563, 0.0], [-4.2558305e-12, -3.9968027e-17, 0.101824366, 1.0]]
```
On Ubuntu linux it seems to enter an infinite loop it never returns from.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.