dimforge / dimforge/nalgebra

Possible to create a non-invertible affine or projective matrix with SubsetOf::to_superset

Open
#1,110 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

I was trying to figure out how to construct an `Affine2` that included a non-uniform scale, and I think I found an unintended route to be able to create a non-invertible affine transform that panics when inverted:

```rust
use simba::scalar::SubsetOf;

let s: Affine2 = Scale2::new(0.0, 0.0).to_superset();
s.inverse(); // panics since anything with `0` scale is non-invertable
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.