Skip to content

Commit

Permalink
add assert for border eps
Browse files Browse the repository at this point in the history
  • Loading branch information
cospectrum committed Mar 30, 2024
1 parent a6b104f commit 3c23bab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/drawing/conics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ mod tests {
((cx - x) as f32 / w).powi(2) + ((cy - y) as f32 / h).powi(2)
}
fn is_boundary_point(&self, (x, y): (i32, i32), boundary_eps: f32) -> bool {
assert!(boundary_eps >= 0.0);
(self.normalized_distance_from_center((x, y)) - 1.0).abs() < boundary_eps
}
fn is_inner_point(&self, (x, y): (i32, i32)) -> bool {
Expand Down

0 comments on commit 3c23bab

Please sign in to comment.