Fix negative length reporting for arc track segments.

Fixes https://gitlab.com/kicad/code/kicad/issues/6039
This commit is contained in:
Jeff Young 2020-10-19 11:58:33 +01:00
parent 91f2a0ef1d
commit ede8499e65
1 changed files with 2 additions and 2 deletions

View File

@ -337,9 +337,9 @@ public:
virtual double GetLength() const override
{
double radius = GetRadius();
double angle = GetAngle();
double includedAngle = std::abs( GetAngle() );
return radius * M_PI * angle / 180.0;
return radius * M_PI * includedAngle / 180.0;
}
EDA_ITEM* Clone() const override;