Performance enhancement for Fracture().

This commit is contained in:
Jeff Young 2019-06-22 17:32:12 +01:00
parent 1099befab1
commit f8f1476f63
1 changed files with 1 additions and 4 deletions

View File

@ -651,10 +651,7 @@ struct FractureEdge
bool matches( int y ) const
{
int y_min = std::min( m_p1.y, m_p2.y );
int y_max = std::max( m_p1.y, m_p2.y );
return ( y >= y_min ) && ( y <= y_max );
return ( y >= m_p1.y || y >= m_p2.y ) && ( y <= m_p1.y || y <= m_p2.y );
}
bool m_connected;