diff options
| author | Arne Dußin | 2020-12-15 00:46:54 +0100 |
|---|---|---|
| committer | Arne Dußin | 2020-12-15 22:51:46 +0100 |
| commit | 9799d3c6a8f0c242668203a1c70d7b6cfed3e855 (patch) | |
| tree | 9116acbc886f680f82309a42b4e6147e65c1433b /src/math/polygon | |
| parent | 3bc690803fb59493ea8180fd630d65b3e26642d0 (diff) | |
| download | graf_karto-9799d3c6a8f0c242668203a1c70d7b6cfed3e855.tar.gz graf_karto-9799d3c6a8f0c242668203a1c70d7b6cfed3e855.zip | |
Refactor to make interaction between tools easier
Diffstat (limited to 'src/math/polygon')
| -rw-r--r-- | src/math/polygon/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/math/polygon/mod.rs b/src/math/polygon/mod.rs index c9dad91..98b1570 100644 --- a/src/math/polygon/mod.rs +++ b/src/math/polygon/mod.rs @@ -409,6 +409,10 @@ impl< true } + + fn is_inside_rect(&self, rect: &Rect<T>) -> bool { + rect.contains_polygon(&self) + } } /* Helper function to calculate the combined angle of a set of points when connecting them one |
