From 046045f9de912c554b5ecab4734a48873b9f1298 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 31 May 2022 10:48:54 +0200 Subject: [PATCH] CalcArcCenter(): fix broken calculation of the arc center. This function is used in the graphic items properties dialog, and each arc edition from this dialog breaks the arc center position Fixes #11703 https://gitlab.com/kicad/code/kicad/issues/11703 --- libs/kimath/src/trigo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/kimath/src/trigo.cpp b/libs/kimath/src/trigo.cpp index afd9fe2b49..cc7406e7e7 100644 --- a/libs/kimath/src/trigo.cpp +++ b/libs/kimath/src/trigo.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2014-2022 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -328,7 +328,7 @@ const VECTOR2D CalcArcCenter( const VECTOR2D& aStart, const VECTOR2D& aEnd, VECTOR2D vec2 = (end - start).Resize( d ); VECTOR2D vc = (end - start).Resize( chord / 2 ); - RotatePoint( vec2, ANGLE_90 ); + RotatePoint( vec2, -ANGLE_90 ); return VECTOR2D( start + vc + vec2 ); }