diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-04-27 23:39:29 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-04-27 23:39:29 +0000 |
| commit | c883d7627a479c8c5b6a9f77b9841fa5631572ad (patch) | |
| tree | fba1186e26a8cc85a1b0728425bef6f2e9aeccd9 /src/2geom/rect.cpp | |
| parent | extensions. ink2canvas.py - do not parse html comments. (Bug 1446204) (diff) | |
| download | inkscape-c883d7627a479c8c5b6a9f77b9841fa5631572ad.tar.gz inkscape-c883d7627a479c8c5b6a9f77b9841fa5631572ad.zip | |
2Geom sync - initial commit
(bzr r14059.2.1)
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 /* |
