mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 21:18:12 +08:00
Update dependencies and lock files (#1841)
* Bump lock files * Fix glam mismatch version * Add tokio feature * Update all deps * Fix gpu-compiler not able to reference the root workspace * Bump a few more deps --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
ab71d26d84
commit
fa1535d0bb
@@ -377,7 +377,7 @@ impl<PointId: crate::Identifier> Subpath<PointId> {
|
||||
// Draw the miter join if the intersection occurs in the correct direction with respect to the path
|
||||
if start_to_intersection.normalize().abs_diff_eq(in_tangent, MAX_ABSOLUTE_DIFFERENCE)
|
||||
&& intersection_to_end.normalize().abs_diff_eq(out_tangent, MAX_ABSOLUTE_DIFFERENCE)
|
||||
&& miter_limit >= 1. / (start_to_intersection.angle_between(-intersection_to_end).abs() / 2.).sin()
|
||||
&& miter_limit >= 1. / (start_to_intersection.angle_to(-intersection_to_end).abs() / 2.).sin()
|
||||
{
|
||||
return Some(ManipulatorGroup {
|
||||
anchor: intersection,
|
||||
@@ -406,10 +406,10 @@ impl<PointId: crate::Identifier> Subpath<PointId> {
|
||||
let in_segment = self.get_segment(self.len_segments() - 1).unwrap();
|
||||
let in_tangent = in_segment.tangent(TValue::Parametric(1.));
|
||||
|
||||
let mut angle = center_to_right.angle_between(center_to_left) / 2.;
|
||||
let mut angle = center_to_right.angle_to(center_to_left) / 2.;
|
||||
let mut arc_point = center + DMat2::from_angle(angle).mul_vec2(center_to_right);
|
||||
|
||||
if (arc_point - left).angle_between(in_tangent).abs() > PI / 2. {
|
||||
if (arc_point - left).angle_to(in_tangent).abs() > PI / 2. {
|
||||
angle = angle - PI * (if angle < 0. { -1. } else { 1. });
|
||||
arc_point = center + DMat2::from_angle(angle).mul_vec2(center_to_right);
|
||||
}
|
||||
@@ -874,8 +874,8 @@ mod tests {
|
||||
|
||||
let middle = (round_start + round_end) / 2.;
|
||||
|
||||
assert!((round_point - middle).angle_between(round_start - middle) > 0.);
|
||||
assert!((round_end - middle).angle_between(round_point - middle) > 0.);
|
||||
assert!((round_point - middle).angle_to(round_start - middle) > 0.);
|
||||
assert!((round_end - middle).angle_to(round_point - middle) > 0.);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -915,7 +915,7 @@ mod tests {
|
||||
|
||||
let middle = (round_start + round_end) / 2.;
|
||||
|
||||
assert!((round_point - middle).angle_between(round_start - middle) < 0.);
|
||||
assert!((round_end - middle).angle_between(round_point - middle) < 0.);
|
||||
assert!((round_point - middle).angle_to(round_start - middle) < 0.);
|
||||
assert!((round_end - middle).angle_to(round_point - middle) < 0.);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user