Skip to content

Commit

Permalink
update panic documentation for update_as_arc
Browse files Browse the repository at this point in the history
  • Loading branch information
antonok-edm committed Jan 6, 2023
1 parent a8c35d6 commit 3685c6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/fj-kernel/src/builder/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ pub trait HalfEdgeBuilder {

/// Update partial half-edge to be an arc, spanning the given angle in
/// radians
///
/// # Panics
///
/// Panics if the given angle is not within the range (-2pi, 2pi) radians.
fn update_as_arc(&mut self, angle_rad: impl Into<Scalar>);

/// Update partial half-edge to be a line segment, from the given points
Expand Down Expand Up @@ -86,7 +90,7 @@ impl HalfEdgeBuilder for PartialHalfEdge {
fn update_as_arc(&mut self, angle_rad: impl Into<Scalar>) {
let angle_rad = angle_rad.into();
if angle_rad <= -Scalar::TAU || angle_rad >= Scalar::TAU {
panic!("arc angle must be in the range (-360, 360)");
panic!("arc angle must be in the range (-2pi, 2pi) radians");
}
let points_surface = self.vertices.each_ref_ext().map(|vertex| {
vertex
Expand Down

0 comments on commit 3685c6f

Please sign in to comment.