cgmath icon indicating copy to clipboard operation
cgmath copied to clipboard

is_invertible fails for really small matrixes even though the invert function works

Open Hrithvik-Alex opened this issue 9 months ago • 1 comments

I caught this because I had the following code:

...
        assert!(mat.is_invertible()); 
        self.clip_to_screen = mat.invert().unwrap().into();
...

The assertion fails. But removing the assertion makes it so that the code runs fine with no other changes. It seems there was some discussion about this in #210, and I see that it changed the equal code to make it so small numbers dont fail the determinant check in the invert() function, but it doesnt edit is_invertible. Seems to me that this behavior should be consistent across the two functions.

Hrithvik-Alex avatar Jan 11 '25 22:01 Hrithvik-Alex