Skip to content

Commit

Permalink
added generic translate() free function
Browse files Browse the repository at this point in the history
  • Loading branch information
skramm committed Dec 15, 2023
1 parent c77a17d commit cb27d1a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions homog2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9755,6 +9755,18 @@ getCenter(const T& other )
return other.getCenter();
}

template<typename T,typename FP1,typename FP2>
void translate( T& prim, FP1 dx, FP2 dy )
{
prim.translate( dx, dy );
}

template<typename T,typename FP>
void translate( T& prim, const Point2d_<FP>& pt )
{
prim.translate( pt.getX(), pt.getY() );
}

/// Returns true if ellipse is a circle
/// \sa Ellipse_::isCircle()
template<typename FPT>
Expand Down

0 comments on commit cb27d1a

Please sign in to comment.