mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-01 21:57:12 -06:00
Homography::from_array accepted nine finite numbers only when det().abs() was above 1e-15. With large entries the determinant can be inf - inf, so a valid stored projection was rejected on reading and its type drew flat, or it can overflow to inf, so a projection that cannot be inverted was accepted. When the determinant is not finite, inverse() now inverts a copy divided by a power of two (largest entry between 0.5 and 1), and treats that copy as not invertible when its determinant is at most 1e-15 times the largest of the six products it sums. from_array and the overflow path of conjugated accept such a map only when that inverse exists. Maps with a finite determinant are judged as before. Follows #4912.