The smallest angle between two segments is 0-180

Not 0-90.  Subtracting 180-angle and then taking the smaller of angle
and 180-angle will always get you 90 or less.  But obtuse angles are not
< 90
This commit is contained in:
Seth Hillbrand 2025-08-31 10:33:29 -07:00
parent 1309b436da
commit c6c8e19e39

View File

@ -104,9 +104,7 @@ EDA_ANGLE SEG::Angle( const SEG& aOther ) const
EDA_ANGLE thisAngle = EDA_ANGLE( A - B ).Normalize180();
EDA_ANGLE otherAngle = EDA_ANGLE( aOther.A - aOther.B ).Normalize180();
EDA_ANGLE angle = std::abs( ( thisAngle - otherAngle ).Normalize180() );
return std::min( ANGLE_180 - angle, angle );
return std::abs( ( thisAngle - otherAngle ).Normalize180() );
}