From fc85374c3cdff1e2cbbd27c85e4c576af4e36bad Mon Sep 17 00:00:00 2001 From: dibenedetto Date: Thu, 19 Jan 2006 13:53:19 +0000 Subject: [PATCH] Fixed product by scalar and SquaredNorm() --- vcg/space/point2.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vcg/space/point2.h b/vcg/space/point2.h index bbbae31f..3a5763fa 100644 --- a/vcg/space/point2.h +++ b/vcg/space/point2.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.7 2005/10/15 19:11:49 m_di_benedetto +Corrected return type in Angle() and protected member access in unary operator - + Revision 1.6 2005/03/18 16:34:42 fiorin minor changes to comply gcc compiler @@ -306,7 +309,7 @@ inline Point2 operator - ( Point2 const & p ){ template inline Point2 operator * ( const T s, Point2 const & p ){ - return Point2( p._v[0] * s, p._v[1] * s ); + return Point2( p[0] * s, p[1] * s ); } template @@ -331,7 +334,7 @@ inline T Distance( Point2 const & p1,Point2 const & p2 ){ template inline T SquaredDistance( Point2 const & p1,Point2 const & p2 ){ - return Norm2(p1-p2); + return SquaredNorm(p1-p2); } typedef Point2 Point2s;