Skip to content

Commit

Permalink
Fix documentation of the new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandicon committed Dec 17, 2024
1 parent e1c97ce commit 384b922
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/great_circle_arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl GreatCircleArc {
Ok(intersections)
}

/// Returns the intersections of this great circle arc with a great circle
/// Checks if there exists an intersection between this great circle arc and the provided great circle
///
/// # Errors
/// Only propagates errors originating from [Self::intersect_great_circle], but handles [SphericalError::IdenticalGreatCircles] internally
Expand Down
4 changes: 2 additions & 2 deletions src/polygon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl Polygon {
/// # Errors
/// This function does not generate its own errors, but may propagate the following:
/// - If any of the edges fails to be constructed as a [GreatCircleArc], returns the corresponding error (see [GreatCircleArc::new]). This should however never happen, as that is checked when the polygon is constructed.
/// - If an edge fails to be intersected with the circle, it returns the corresponding error (refer to [GreatCircle::intersect_great_circle_arc] for more details).
/// - If an edge fails to be intersected with the circle, it returns the corresponding error (refer to [GreatCircleArc::intersect_great_circle] for more details).
pub fn great_circle_intersections(&self, circle: &GreatCircle) -> Result<Vec<SphericalPoint>, SphericalError> {
let mut intersections = Vec::new();

Expand Down Expand Up @@ -202,7 +202,7 @@ impl Polygon {
/// # Errors
/// This function does not generate its own errors, but may propagate the following:
/// - If any of the edges fails to be constructed as a [GreatCircleArc], returns the corresponding error (see [GreatCircleArc::new]). This should however never happen, as that is checked when the polygon is constructed.
/// - If an edge fails to be intersected with the circle, it returns the corresponding error (refer to [GreatCircle::intersects_great_circle_arc] for more details). Handles parallel circles as infinite intersections (returns `Ok(true)`) though.
/// - If an edge fails to be intersected with the circle, it returns the corresponding error (refer to [GreatCircleArc::intersects_great_circle] for more details). Handles parallel circles as infinite intersections (returns `Ok(true)`) though.
pub fn intersects_great_circle(&self, circle: &GreatCircle) -> Result<bool, SphericalError> {
for i in 0..self.vertices.len() - 1 {
let edge = GreatCircleArc::new(self.vertices[i], self.vertices[i + 1])?;
Expand Down

0 comments on commit 384b922

Please sign in to comment.