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