Skip to content

Commit 9084b84

Browse files
committed
minor fixes (types issues)
1 parent be4ad06 commit 9084b84

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

homog2d.hpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3670,9 +3670,9 @@ Ellipse_<FPT>::Ellipse_( const Circle_<FPT>& cir )
36703670
namespace priv {
36713671

36723672
/// Helper function, factorized here for the two impl_getPoints_A() implementations
3673-
template<typename FPT, typename FPT2>
3673+
template<typename FPT, typename FPT2, typename FPT3>
36743674
auto
3675-
getPoints_B2( const Point2d_<FPT>& pt, FPT2 dist, const Line2d_<FPT>& li )
3675+
getPoints_B2( const Point2d_<FPT>& pt, FPT2 dist, const Line2d_<FPT3>& li )
36763676
{
36773677
auto arr = li.get();
36783678
const HOMOG2D_INUMTYPE a = static_cast<HOMOG2D_INUMTYPE>(arr[0]);
@@ -4076,11 +4076,13 @@ Thus, we need the second one.
40764076
}
40774077

40784078
/// Returns a pair of points that are lying on line at distance \c dist from a point defined by one of its coordinates.
4079-
template<typename FPT2>
4079+
template<typename FPT2,typename FPT3>
40804080
PointPair_<FPT>
4081-
getPoints( GivenCoord gc, FPT coord, FPT2 dist ) const
4081+
getPoints( GivenCoord gc, FPT2 coord, FPT3 dist ) const
40824082
{
40834083
static_assert( std::is_same_v<LP,typ::IsLine>, "Invalid: you cannot call on a point" );
4084+
HOMOG2D_CHECK_IS_NUMBER(FPT2);
4085+
HOMOG2D_CHECK_IS_NUMBER(FPT3);
40844086

40854087
const auto pt = getPoint( gc, coord );
40864088
return priv::getPoints_B2( pt, dist, *this );
@@ -8807,6 +8809,8 @@ PointPair_<FPT>
88078809
LPBase<LP,FPT>::getPoints( const Point2d_<FPT2>& pt, FPT3 dist ) const
88088810
{
88098811
static_assert( std::is_same_v<LP,typ::IsLine>, "Invalid: you cannot call on a point" );
8812+
HOMOG2D_CHECK_IS_NUMBER(FPT2);
8813+
HOMOG2D_CHECK_IS_NUMBER(FPT3);
88108814

88118815
#ifndef HOMOG2D_NOCHECKS
88128816
if( this->distTo( pt ) > thr::nullDistance() )

0 commit comments

Comments
 (0)