From 450537c7165371a60abac18e24ca244447564165 Mon Sep 17 00:00:00 2001 From: skramm Date: Tue, 12 Dec 2023 23:35:13 +0100 Subject: [PATCH] RCP build --- homog2d.hpp | 6 ++++-- misc/demo_opencv.cpp | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/homog2d.hpp b/homog2d.hpp index b8cf558..43172b3 100644 --- a/homog2d.hpp +++ b/homog2d.hpp @@ -6061,6 +6061,7 @@ Two tasks: }; // class PolylineBase /// Build a Regular Convex Polygon of radius \c rad with \c n points, centered at (0,0) +/// \todo handle sin() and cos() to support ttmath template template void @@ -6070,12 +6071,13 @@ PolylineBase::impl_constr_RCP( FPT2 rad, size_t n, const detail::PlHelp HOMOG2D_THROW_ERROR_1( "unable, nb of points must be > 2" ); if( rad <= 0 ) HOMOG2D_THROW_ERROR_1( "unable, radius must be >= 0" ); + std::vector> v_pts(n); auto it = std::begin( v_pts ); + auto angle0 = (HOMOG2D_INUMTYPE)2. * M_PI / n; for( size_t i=0; i