mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-13 17:53:11 +02:00
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:
parent
1309b436da
commit
c6c8e19e39
@ -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() );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user