From 9821258b3a3004c7806181982d809ff9c2aeee90 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 30 Sep 2006 13:30:56 +0000 Subject: [PATCH] missing Normalize implementation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/geometry.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/wx/geometry.h b/include/wx/geometry.h index 2aa92a80f9..10c60516d3 100644 --- a/include/wx/geometry.h +++ b/include/wx/geometry.h @@ -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 ) ); -- 2.45.2