missing Normalize implementation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2006-09-30 13:30:56 +00:00
parent c2b9ae5f7f
commit 9821258b3a

View File

@ -379,6 +379,11 @@ inline void wxPoint2DDouble::SetVectorLength( wxDouble length )
m_y = (m_y * length / before) ;
}
inline void wxPoint2DDouble::Normalize()
{
SetVectorLength( 1 );
}
inline wxDouble wxPoint2DDouble::GetDistance( const wxPoint2DDouble &pt ) const
{
return sqrt( GetDistanceSquare( pt ) );