Skip to content

Commit

Permalink
Move related code closer together
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Aug 29, 2022
1 parent ee01831 commit 5600913
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/fj-kernel/src/algorithms/approx/curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ fn approx_circle(
range: impl Into<RangeOnCurve>,
tolerance: Tolerance,
) -> Vec<(Point<1>, Point<3>)> {
let mut points = Vec::new();

let radius = circle.a().magnitude();
let range = range.into();

Expand All @@ -57,6 +55,8 @@ fn approx_circle(

let n = number_of_vertices_for_circle(tolerance, radius, range.length());

let mut points = Vec::new();

for i in 0..n {
let angle = range.start().t
+ (Scalar::TAU / n as f64 * i as f64) * range.direction();
Expand Down

0 comments on commit 5600913

Please sign in to comment.