Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 16, 2023
1 parent d105d15 commit fc4ae56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/fj-math/src/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ impl Arc {
/ (2. * (angle_rad.abs().into_f64() / 2.).sin());

let center = {
let midpoint = (p0.coords + p1.coords) / 2.;
let unit_vector_midpoint_to_center = {
let clockwise_turn = angle_rad <= Scalar::ZERO;
let f = match (clockwise_turn, more_than_half_turn) {
Expand All @@ -54,7 +55,7 @@ impl Arc {
.sqrt();

Point {
coords: (p0.coords + p1.coords) / 2.
coords: midpoint
+ unit_vector_midpoint_to_center
* distance_center_to_midpoint,
}
Expand Down

0 comments on commit fc4ae56

Please sign in to comment.