Skip to content

Commit 925c181

Browse files
committed
Fix edge case
1 parent f310b4f commit 925c181

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

node-graph/nodes/vector/src/vector_nodes.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,9 +1930,10 @@ async fn jitter_points(
19301930
let col1_exists = col1.length_squared() > (f64::EPSILON * 1e3).powi(2);
19311931

19321932
let repaired = match (col0_exists, col1_exists) {
1933-
(true, false) => DMat2::from_cols(col0, col0.perp().normalize()),
1933+
// Replace the collapsed axis (like scale.x=2, skew.y=2) with a unit perpendicular of the surviving one
1934+
(true, _) => DMat2::from_cols(col0, col0.perp().normalize()),
19341935
(false, true) => DMat2::from_cols(col1.perp().normalize(), col1),
1935-
_ => DMat2::IDENTITY,
1936+
(false, false) => DMat2::IDENTITY,
19361937
};
19371938
repaired.inverse()
19381939
};

0 commit comments

Comments
 (0)