fixing int overflows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -157,7 +157,7 @@ inline wxDouble wxPoint2DInt::GetDistance( const wxPoint2DInt &pt ) const
|
||||
|
||||
inline wxDouble wxPoint2DInt::GetDistanceSquare( const wxPoint2DInt &pt ) const
|
||||
{
|
||||
return ( (pt.m_x-m_x)*(pt.m_x-m_x) + (pt.m_y-m_y)*(pt.m_y-m_y) );
|
||||
return ( (wxDouble)(pt.m_x-m_x)*(pt.m_x-m_x) + (wxDouble)(pt.m_y-m_y)*(pt.m_y-m_y) );
|
||||
}
|
||||
|
||||
inline wxInt32 wxPoint2DInt::GetDotProduct( const wxPoint2DInt &vec ) const
|
||||
|
Reference in New Issue
Block a user