nalgebra icon indicating copy to clipboard operation
nalgebra copied to clipboard

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

Open casey opened this issue 2 years ago • 0 comments

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:

use simba::scalar::SubsetOf;

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

casey avatar May 16 '22 03:05 casey