Skip to content

Commit

Permalink
improved docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenGar committed Dec 4, 2024
1 parent 7820d92 commit 849856d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jagua-rs/src/geometry/primitives/aa_rectangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,22 @@ impl AARectangle {
}
}

/// Returns the top-edge along y_max
pub fn top_edge(&self) -> Edge {
Edge::new(Point(self.x_max, self.y_max), Point(self.x_min, self.y_max))
}

/// Returns the bottom-edge along y_min
pub fn bottom_edge(&self) -> Edge {
Edge::new(Point(self.x_min, self.y_min), Point(self.x_max, self.y_min))
}

/// Returns the left-edge along x_min
pub fn left_edge(&self) -> Edge {
Edge::new(Point(self.x_min, self.y_max), Point(self.x_min, self.y_min))
}

/// Returns the right-edge along x_max
pub fn right_edge(&self) -> Edge {
Edge::new(Point(self.x_max, self.y_min), Point(self.x_max, self.y_max))
}
Expand Down

0 comments on commit 849856d

Please sign in to comment.