Commit a377c9c1 authored by Maciej Suminski's avatar Maciej Suminski

Fixed erroneous hit testing for polygons in ratsnest for GAL.

parent afc56d3f
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment