From ede8499e6573f33c7c58310df61229a32bddae54 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 19 Oct 2020 11:58:33 +0100 Subject: [PATCH] Fix negative length reporting for arc track segments. Fixes https://gitlab.com/kicad/code/kicad/issues/6039 --- pcbnew/class_track.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 2fdc7caba9..e74c4f8bcb 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -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;