Skip to content

Commit

Permalink
Fix horizontal distance on Rectangle
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-piles committed Dec 17, 2024
1 parent 9f26eae commit a296fcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pdf-document-layout-analysis"
version = "2024.12.17.4"
version = "2024.12.17.5"
description = "This tool is for PDF document layout analysis"
license = { file = "LICENSE" }
authors = [{ name = "HURIDOCS" }]
Expand Down
2 changes: 1 addition & 1 deletion src/pdf_features/Rectangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_horizontal_distance(self, rectangle: "Rectangle") -> float:
left = max(self.left, rectangle.left)
right = min(self.right, rectangle.right)

return right - left
return left - right

def area(self):
return self.width * self.height
Expand Down

0 comments on commit a296fcb

Please sign in to comment.