diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-07-04 16:15:46 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-07-04 16:15:46 +0000 |
| commit | 1112ab0a12fc0cb5a6b00d1bbd5b100c55eedff8 (patch) | |
| tree | a91517f9165322b4e42c6cdeb4263beaedc4d02f /src/2geom/rect.cpp | |
| parent | Packaging. New Win32 installer Danish translation. (diff) | |
| parent | Upgrade to 2Geom r2413 (diff) | |
| download | inkscape-1112ab0a12fc0cb5a6b00d1bbd5b100c55eedff8.tar.gz inkscape-1112ab0a12fc0cb5a6b00d1bbd5b100c55eedff8.zip | |
Sync 2Geom to revision 2413.
May introduce regressions.
(bzr r14226)
Diffstat (limited to 'src/2geom/rect.cpp')
| -rw-r--r-- | src/2geom/rect.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/2geom/rect.cpp b/src/2geom/rect.cpp index 0cb842d29..383e72c8e 100644 --- a/src/2geom/rect.cpp +++ b/src/2geom/rect.cpp @@ -84,6 +84,17 @@ Coord distance(Point const &p, Rect const &rect) return hypot(dx, dy); } +Coord distanceSq(Point const &p, OptRect const &rect) +{ + if (!rect) return std::numeric_limits<Coord>::max(); + return distanceSq(p, *rect); +} +Coord distance(Point const &p, OptRect const &rect) +{ + if (!rect) return std::numeric_limits<Coord>::max(); + return distance(p, *rect); +} + } // namespace Geom /* |
