nalgebra
nalgebra copied to clipboard
Possible to create a non-invertible affine or projective matrix with SubsetOf::to_superset
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