From 24ca7add42499b9466c7211cd58d7ea2a074cebb Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 6 Nov 2023 00:43:41 +0000 Subject: [PATCH] Don't clamp arc centers quite so aggressively. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16029 --- libs/kimath/src/trigo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/kimath/src/trigo.cpp b/libs/kimath/src/trigo.cpp index 383fb2d634..e503f93d75 100644 --- a/libs/kimath/src/trigo.cpp +++ b/libs/kimath/src/trigo.cpp @@ -469,13 +469,13 @@ const VECTOR2I CalcArcCenter( const VECTOR2I& aStart, const VECTOR2I& aMid, cons VECTOR2I iCenter; - iCenter.x = KiROUND( Clamp( double( std::numeric_limits::min() / 2.0 ), + iCenter.x = KiROUND( Clamp( double( std::numeric_limits::min() + 100 ), dCenter.x, - double( std::numeric_limits::max() / 2.0 ) ) ); + double( std::numeric_limits::max() - 100 ) ) ); - iCenter.y = KiROUND( Clamp( double( std::numeric_limits::min() / 2.0 ), + iCenter.y = KiROUND( Clamp( double( std::numeric_limits::min() + 100 ), dCenter.y, - double( std::numeric_limits::max() / 2.0 ) ) ); + double( std::numeric_limits::max() - 100 ) ) ); return iCenter; }