From cb27d1af06126280d9ca5237deab11b7d8b2fab4 Mon Sep 17 00:00:00 2001 From: "S. Kramm" Date: Fri, 15 Dec 2023 23:01:53 +0100 Subject: [PATCH] added generic translate() free function --- homog2d.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/homog2d.hpp b/homog2d.hpp index 2291d66..924fd1b 100644 --- a/homog2d.hpp +++ b/homog2d.hpp @@ -9755,6 +9755,18 @@ getCenter(const T& other ) return other.getCenter(); } +template +void translate( T& prim, FP1 dx, FP2 dy ) +{ + prim.translate( dx, dy ); +} + +template +void translate( T& prim, const Point2d_& pt ) +{ + prim.translate( pt.getX(), pt.getY() ); +} + /// Returns true if ellipse is a circle /// \sa Ellipse_::isCircle() template