mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-17 23:58:24 +00:00
M4: rustfmt the radius test's arc check (#2334)
This commit is contained in:
1 parent
4d60cfbcf9
commit
dc7bc62c5e
1 file changed
+4
-1
@@ -48,7 +48,10 @@ fn assert_arcs(path: &BezPath, want: &[(Point, Point, Point, f64)], why: &str) {
|
||||
// Two arcs can share both ends (opposite corners of a square), so the middle picks one.
|
||||
let ends = |c: &&CubicBez| (near(c.p0, a) && near(c.p3, b)) || (near(c.p0, b) && near(c.p3, a));
|
||||
let passing: Vec<Point> = got.iter().filter(ends).map(|c| c.eval(0.5)).collect();
|
||||
assert!(passing.iter().any(|&m| near(m, mid)), "{why}: no arc at {corner:?} from {a:?} to {b:?} through {mid:?}; arcs between them pass {passing:?}");
|
||||
assert!(
|
||||
passing.iter().any(|&m| near(m, mid)),
|
||||
"{why}: no arc at {corner:?} from {a:?} to {b:?} through {mid:?}; arcs between them pass {passing:?}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user