Skip to content

Commit

Permalink
clippy: Fix upcoming items_after_test_module lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored and cmyr committed Oct 10, 2023
1 parent 10b328f commit 0bdecb8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/circle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,16 @@ impl Shape for CircleSegment {
}
}

#[inline]
fn point_on_circle(center: Point, radius: f64, angle: f64) -> Point {
let (angle_sin, angle_cos) = angle.sin_cos();
center
+ Vec2 {
x: angle_cos * radius,
y: angle_sin * radius,
}
}

#[cfg(test)]
mod tests {
use crate::{Circle, Point, Shape};
Expand Down Expand Up @@ -388,13 +398,3 @@ mod tests {
assert_eq!(c_neg_radius.winding(center), p_neg_radius.winding(center));
}
}

#[inline]
fn point_on_circle(center: Point, radius: f64, angle: f64) -> Point {
let (angle_sin, angle_cos) = angle.sin_cos();
center
+ Vec2 {
x: angle_cos * radius,
y: angle_sin * radius,
}
}

0 comments on commit 0bdecb8

Please sign in to comment.