Fixed erroneous hit testing for polygons in ratsnest for GAL.

This commit is contained in:
Maciej Suminski 2014-03-12 15:00:14 +01:00
parent 55f9aaabd7
commit c7e3887ba4
1 changed files with 2 additions and 2 deletions

View File

@ -356,8 +356,8 @@ bool RN_POLY::HitTest( const RN_NODE_PTR& aNode ) const
x2 = xOld; y2 = yOld;
}
if( ( xNew < xt ) == ( xt <= xOld ) /* edge "open" at left end */
&& ( yt - y1 ) * ( x2 - x1 ) < ( y2 - y1 ) * ( xt - x1 ) )
if( ( xNew < xt ) == ( xt <= xOld ) && /* edge "open" at left end */
(float)( yt - y1 ) * (float)( x2 - x1 ) < (float)( y2 - y1 ) * (float)( xt - x1 ) )
{
inside = !inside;
}